188 art::ServiceHandle<geo::Geometry> geom;
190 std::vector<sim::SimPhotons>
const& optical = *(
evt.getValidHandle<std::vector<sim::SimPhotons>>(
photonLabel));
191 std::vector<sim::SimChannel>
const& charge = *(
evt.getValidHandle<std::vector<sim::SimChannel>>(
chargeLabel));
192 std::vector<recob::OpHit>
const&
hit = *(
evt.getValidHandle<std::vector<recob::OpHit>>(
hitLabel));
201 auto type =
evt.getMany< std::vector<simb::MCTruth> >();
203 for(
size_t mcl = 0; mcl <
type.size(); ++mcl)
205 art::Handle< std::vector<simb::MCTruth> > mclistHandle =
type[mcl];
207 for(
size_t m = 0;
m < mclistHandle->size(); ++
m)
209 art::Ptr<simb::MCTruth> mct(mclistHandle,
m);
243 for (
int u=0; u<360; u++)
257 for (std::size_t chargechannel = 0; chargechannel<charge.size(); ++chargechannel)
259 auto const& channeltdcide = charge.at(chargechannel).TDCIDEMap();
261 for (std::size_t TDCnu = 0; TDCnu<channeltdcide.size(); ++TDCnu)
264 sim::TDCIDE const& tdcide = channeltdcide.at(TDCnu);
266 for (std::size_t IDEnu = 0; IDEnu<tdcide.second.size(); ++IDEnu)
268 sim::IDE const& ida = tdcide.second.at(IDEnu);
297 for (std::size_t channel = 0; channel < optical.size(); ++channel) {
301 noPMT[channel] = channel;
318 geom->OpDetGeoFromOpChannel(channel).GetCenter(xyz);
320 PMTx[channel] = xyz[0];
321 PMTy[channel] = xyz[1];
322 PMTz[channel] = xyz[2];
330 if (photons_collected[channel]>0)
332 for (
size_t i = 0; i<photon_vec.size() && int(i)<
MaxPhotons; ++i)
350 if (
PMTx[channel]<-200){
TPC[channel]=0;}
351 if (
PMTx[channel]>-200 &&
PMTx[channel]<0){
TPC[channel]=1;}
352 if (
PMTx[channel]<200 &&
PMTx[channel]>0){
TPC[channel]=2;}
353 if (
PMTx[channel]>200){
TPC[channel]=3;}
382 std::cout <<
"Qua arriva prima del for" << std::endl;
384 for (std::size_t hit_n = 0; hit_n < hit.size(); ++hit_n) {
389 std::cout <<
"apre il vettore numer = " << hit_n << std::endl;
float z
z position of ionization [cm]
std::pair< unsigned short, std::vector< sim::IDE > > TDCIDE
List of energy deposits at the same time (on this channel)
float photon_time[nPMTs][MaxPhotons]
float photons_collected[nPMTs]
art::InputTag photonLabel
double hit_peaktime[nPMTs]
float x
x position of ionization [cm]
tuple m
now if test mode generate materials, CRT shell, world, gdml header else just generate CRT shell for u...
Ionization at a point of the TPC sensitive volume.
float energy
energy deposited by ionization by this track ID and time [MeV]
float QE_photons_collected[nPMTs]
float y
y position of ionization [cm]
Collection of photons which recorded on one channel.
float total_quenched_energy
art::InputTag chargeLabel
float firstphoton_time[nPMTs]
BEGIN_PROLOG could also be cout