Public Member Functions | Private Member Functions | Private Attributes | List of all members
SNAna Class Reference
Inheritance diagram for SNAna:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Member Functions

 SNAna (fhicl::ParameterSet const &p)
 
 SNAna (SNAna const &)=delete
 
 SNAna (SNAna &&)=delete
 
SNAnaoperator= (SNAna const &)=delete
 
SNAnaoperator= (SNAna &&)=delete
 
void analyze (art::Event const &evt) override
 
void reconfigure (fhicl::ParameterSet const &p)
 
void beginJob () override
 
void endJob () override
 
- Public Member Functions inherited from art::EDAnalyzer
 EDAnalyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDAnalyzer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Analyzer
virtual ~Analyzer () noexcept
 
 Analyzer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 Analyzer (Table< Config > const &config)
 
void doBeginJob (SharedResources const &resources)
 
void doEndJob ()
 
void doRespondToOpenInputFile (FileBlock const &fb)
 
void doRespondToCloseInputFile (FileBlock const &fb)
 
void doRespondToOpenOutputFiles (FileBlock const &fb)
 
void doRespondToCloseOutputFiles (FileBlock const &fb)
 
bool doBeginRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doEndRun (RunPrincipal &rp, ModuleContext const &mc)
 
bool doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc)
 
bool doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed)
 
- Public Member Functions inherited from art::Observer
 ~Observer () noexcept
 
 Observer (Observer const &)=delete
 
 Observer (Observer &&)=delete
 
Observeroperator= (Observer const &)=delete
 
Observeroperator= (Observer &&)=delete
 
void registerProducts (ProductDescriptions &, ModuleDescription const &)
 
void fillDescriptions (ModuleDescription const &)
 
fhicl::ParameterSetID selectorConfig () const
 
- Public Member Functions inherited from art::ModuleBase
virtual ~ModuleBase () noexcept
 
 ModuleBase ()
 
ModuleDescription const & moduleDescription () const
 
void setModuleDescription (ModuleDescription const &)
 
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables () const
 
void sortConsumables (std::string const &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Private Member Functions

void ResetVariables ()
 
void FillMyMaps (std::map< int, simb::MCParticle > &MyMap, art::FindManyP< simb::MCParticle > Assn, art::Handle< std::vector< simb::MCTruth > > Hand, std::map< int, int > *indexMap=nullptr)
 
PType WhichParType (int TrID)
 
bool InMyMap (int TrID, std::map< int, simb::MCParticle > ParMap)
 
void FillTruth (const art::FindManyP< simb::MCParticle > Assn, const art::Handle< std::vector< simb::MCTruth >> &Hand, const PType type)
 
void SaveNeighbourADC (int channel, art::Handle< std::vector< raw::RawDigit > >rawDigitsVecHandle, std::set< int > badChannels, recob::Hit const &hits)
 
void SaveIDEs (art::Event const &evt)
 

Private Attributes

std::string fname
 
int firstCatch
 
int secondCatch
 
int thirdCatch
 
std::string fRawDigitLabel
 
std::string fHitLabel
 
std::string fCalDataModuleLabel
 
std::string fOpHitModuleLabel
 
std::string fGEANTLabel
 
std::string fMARLLabel
 
std::map< int, simb::MCParticleMarlParts
 
std::string fAPALabel
 
std::map< int, simb::MCParticleAPAParts
 
std::string fCPALabel
 
std::map< int, simb::MCParticleCPAParts
 
std::string fAr39Label
 
std::map< int, simb::MCParticleAr39Parts
 
std::string fNeutLabel
 
std::map< int, simb::MCParticleNeutParts
 
std::string fKrypLabel
 
std::map< int, simb::MCParticleKrypParts
 
std::string fPlonLabel
 
std::map< int, simb::MCParticlePlonParts
 
std::string fRdonLabel
 
std::map< int, simb::MCParticleRdonParts
 
std::string fAr42Label
 
std::map< int, simb::MCParticleAr42Parts
 
std::map< int, const simb::MCParticle * > truthmap
 
std::map< int, int > trkIDToMarleyIndex
 
std::map< int, PTypetrkIDToPType
 
bool fSaveNeighbourADCs
 
bool fSaveIDEs
 
bool fSaveTruth
 
bool fSaveTPC
 
bool fSavePDS
 
TTree * fSNAnaTree
 
int Run
 
int SubRun
 
int Event
 
int NTotHit
 
int NColHit
 
int NIndHit
 
int NHitNoBT
 
std::vector< int > Hit_View
 
std::vector< int > Hit_Size
 
std::vector< int > Hit_TPC
 
std::vector< int > Hit_Chan
 
std::vector< double > Hit_X_start
 
std::vector< double > Hit_Y_start
 
std::vector< double > Hit_Z_start
 
std::vector< double > Hit_X_end
 
std::vector< double > Hit_Y_end
 
std::vector< double > Hit_Z_end
 
std::vector< float > Hit_Time
 
std::vector< float > Hit_RMS
 
std::vector< float > Hit_SADC
 
std::vector< float > Hit_Int
 
std::vector< float > Hit_Peak
 
std::vector< int > Hit_True_GenType
 
std::vector< int > Hit_True_MainTrID
 
std::vector< int > Hit_True_TrackID
 
std::vector< float > Hit_True_EvEnergy
 
std::vector< int > Hit_True_MarleyIndex
 
std::vector< float > Hit_True_X
 
std::vector< float > Hit_True_Y
 
std::vector< float > Hit_True_Z
 
std::vector< float > Hit_True_Energy
 
std::vector< float > Hit_True_nElec
 
std::vector< int > Hit_True_nIDEs
 
std::vector< int > Hit_AdjM5SADC
 
std::vector< int > Hit_AdjM2SADC
 
std::vector< int > Hit_AdjM1SADC
 
std::vector< int > Hit_AdjP1SADC
 
std::vector< int > Hit_AdjP2SADC
 
std::vector< int > Hit_AdjP5SADC
 
std::vector< int > Hit_AdjM5Chan
 
std::vector< int > Hit_AdjM2Chan
 
std::vector< int > Hit_AdjM1Chan
 
std::vector< int > Hit_AdjP1Chan
 
std::vector< int > Hit_AdjP2Chan
 
std::vector< int > Hit_AdjP5Chan
 
std::vector< int > PDS_OpHit_OpChannel
 
std::vector< double > PDS_OpHit_X
 
std::vector< double > PDS_OpHit_Y
 
std::vector< double > PDS_OpHit_Z
 
std::vector< double > PDS_OpHit_PeakTimeAbs
 
std::vector< double > PDS_OpHit_PeakTime
 
std::vector< unsigned short > PDS_OpHit_Frame
 
std::vector< double > PDS_OpHit_Width
 
std::vector< double > PDS_OpHit_Area
 
std::vector< double > PDS_OpHit_Amplitude
 
std::vector< double > PDS_OpHit_PE
 
std::vector< double > PDS_OpHit_FastToTotal
 
std::vector< int > PDS_OpHit_True_GenType
 
std::vector< int > PDS_OpHit_True_Index
 
std::vector< double > PDS_OpHit_True_Energy
 
std::vector< int > PDS_OpHit_True_TrackID
 
std::vector< int > PDS_OpHit_True_GenTypeAll
 
std::vector< double > PDS_OpHit_True_EnergyAll
 
std::vector< int > PDS_OpHit_True_TrackIDAll
 
std::vector< int > PDS_OpHit_True_IndexAll
 
std::vector< int > True_VertexChan
 
std::vector< int > True_Nu_Type
 
std::vector< int > True_Nu_Lep_Type
 
std::vector< int > True_Mode
 
std::vector< int > True_CCNC
 
std::vector< int > True_HitNucleon
 
std::vector< int > True_Target
 
std::vector< int > True_MarlSample
 
std::vector< float > True_MarlTime
 
std::vector< float > True_MarlWeight
 
std::vector< float > True_ENu
 
std::vector< float > True_ENu_Lep
 
std::vector< float > True_VertX
 
std::vector< float > True_VertY
 
std::vector< float > True_VertZ
 
std::vector< float > True_VertexT
 
std::vector< float > True_Px
 
std::vector< float > True_Py
 
std::vector< float > True_Pz
 
std::vector< float > True_Dirx
 
std::vector< float > True_Diry
 
std::vector< float > True_Dirz
 
std::vector< float > True_Time
 
std::vector< int > True_Bck_Mode
 
std::vector< int > True_Bck_PDG
 
std::vector< int > True_Bck_ID
 
std::vector< std::stringTrue_Bck_Process
 
std::vector< std::stringTrue_Bck_EndProcess
 
std::vector< int > True_Bck_Mother
 
std::vector< double > True_Bck_P
 
std::vector< double > True_Bck_VertX
 
std::vector< double > True_Bck_VertY
 
std::vector< double > True_Bck_VertZ
 
std::vector< double > True_Bck_Time
 
std::vector< double > True_Bck_Energy
 
std::vector< double > True_Bck_EndX
 
std::vector< double > True_Bck_EndY
 
std::vector< double > True_Bck_EndZ
 
std::vector< double > True_Bck_EndT
 
std::vector< double > True_Bck_EndE
 
int NTotIDEs
 
std::vector< int > IDEChannel
 
std::vector< int > IDEStartTime
 
std::vector< int > IDEEndTime
 
std::vector< float > IDEEnergy
 
std::vector< float > IDEElectrons
 
std::vector< int > IDEParticle
 
int TotGen_Marl
 
int TotGen_APA
 
int TotGen_CPA
 
int TotGen_Ar39
 
int TotGen_Neut
 
int TotGen_Kryp
 
int TotGen_Plon
 
int TotGen_Rdon
 
int TotGen_Ar42
 
art::ServiceHandle< geo::Geometrygeo
 
art::ServiceHandle< cheat::BackTrackerServicebt_serv
 
art::ServiceHandle< cheat::ParticleInventoryServicepi_serv
 
art::ServiceHandle< cheat::PhotonBackTrackerServicepbt_serv
 

Additional Inherited Members

- Public Types inherited from art::EDAnalyzer
using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 
- Protected Member Functions inherited from art::Observer
std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResultsgetTriggerResults (Event const &e) const
 
 Observer (fhicl::ParameterSet const &config)
 
 Observer (std::vector< std::string > const &select_paths, std::vector< std::string > const &reject_paths, fhicl::ParameterSet const &config)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > consumes (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename T , BranchType = InEvent>
ProductToken< T > mayConsume (InputTag const &)
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 

Detailed Description

Definition at line 71 of file SNAna_module.cc.

Constructor & Destructor Documentation

SNAna::SNAna ( fhicl::ParameterSet const &  p)
explicit

Definition at line 277 of file SNAna_module.cc.

277  :EDAnalyzer(p),
278  fname("SNAna_module")
279 {
280  this->reconfigure(p);
281 }
std::string fname
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
p
Definition: test.py:223
void reconfigure(fhicl::ParameterSet const &p)
SNAna::SNAna ( SNAna const &  )
delete
SNAna::SNAna ( SNAna &&  )
delete

Member Function Documentation

void SNAna::analyze ( art::Event const &  evt)
overridevirtual

Implements art::EDAnalyzer.

Definition at line 599 of file SNAna_module.cc.

600 {
601  ResetVariables();
602 
603  Run = evt.run();
604  SubRun = evt.subRun();
605  Event = evt.event();
606 
607  //GET INFORMATION ABOUT THE DETECTOR'S GEOMETRY.
608  auto const* geo = lar::providerFrom<geo::Geometry>();
609 
610  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
611  auto const detProp = art::ServiceHandle<detinfo::DetectorPropertiesService const>()->DataFor(evt, clockData);
612 
613  //LIFT OUT THE MARLEY PARTICLES.
614  //auto MarlTrue = evt.getValidHandle<std::vector<simb::MCTruth> >(fMARLLabel);
615  auto MarlTrue = evt.getHandle< std::vector<simb::MCTruth> >(fMARLLabel);
616  if (MarlTrue) {
617  art::FindManyP<simb::MCParticle> MarlAssn(MarlTrue,evt,fGEANTLabel);
618  FillMyMaps( MarlParts, MarlAssn, MarlTrue, &trkIDToMarleyIndex );
619  TotGen_Marl = MarlParts.size();
620  double Px_(0), Py_(0), Pz_(0), Pnorm(1);
621 
622  for(size_t i = 0; i < MarlTrue->size(); i++)
623  {
624  True_Nu_Type .push_back(MarlTrue->at(i).GetNeutrino().Nu().PdgCode());
625  True_Nu_Lep_Type.push_back(MarlTrue->at(i).GetNeutrino().Lepton().PdgCode());
626  True_Mode .push_back(MarlTrue->at(i).GetNeutrino().Mode());
627  True_CCNC .push_back(MarlTrue->at(i).GetNeutrino().CCNC());
628  True_Target .push_back(MarlTrue->at(i).GetNeutrino().Target());
629  True_HitNucleon .push_back(MarlTrue->at(i).GetNeutrino().HitNuc());
630  True_VertX .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Vx());
631  True_VertY .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Vy());
632  True_VertZ .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Vz());
633  True_ENu_Lep .push_back(MarlTrue->at(i).GetNeutrino().Lepton().E());
634  True_ENu .push_back(MarlTrue->at(i).GetNeutrino().Nu().E());
635  True_Px .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Px());
636  True_Py .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Py());
637  True_Pz .push_back(MarlTrue->at(i).GetNeutrino().Lepton().Pz());
638  Pnorm = std::sqrt(Px_*Px_+Py_*Py_+Pz_*Pz_);
639  double Px = Px_/Pnorm;
640  double Py = Py_/Pnorm;
641  double Pz = Pz_/Pnorm;
642  True_Dirx.push_back(Px);
643  True_Diry.push_back(Py);
644  True_Dirz.push_back(Pz);
645  True_Time.push_back(MarlTrue->at(i).GetNeutrino().Lepton().T());
646 
647  try {
648  art::FindManyP<sim::SupernovaTruth> SNTruth(MarlTrue, evt, fMARLLabel);
649  for (size_t j = 0; j < SNTruth.at(i).size(); j++) {
650  const sim::SupernovaTruth ThisTr = (*SNTruth.at(i).at(j));
651  True_MarlTime .push_back(ThisTr.SupernovaTime);
652  True_MarlWeight.push_back(ThisTr.Weight);
653  True_MarlSample.push_back(ThisTr.SamplingMode);
654  }
655  } catch (...) {
656  mf::LogDebug(fname) << "Didnt find SN truth (few things wont available):\n"
657  << " - MarlTime\n"
658  << " - MarlWeight\n"
659  << " - MarlSample\n";
660  }
661  }
662 
663  for(size_t i=0; i<True_VertX.size(); ++i) {
664  bool caught = false;
665  double Vertex[3] = {True_VertX[i],
666  True_VertY[i],
667  True_VertZ[i]};
669  geo::PlaneID Plane(geo->FindTPCAtPosition(Vertex),geo::kZ);
670  try
671  {
672  WireID = geo->NearestWireID(Vertex, Plane);
673  }
674  catch(...)
675  {
676  caught = true;
677  }
678  if(caught==true)
679  {
680  True_VertexChan.push_back(-1);
681  }
682  else
683  {
684  True_VertexChan.push_back(geo->PlaneWireToChannel(WireID));
685  }
686 
687  //CM/MICROSECOND.
688  double drift_velocity = detProp.DriftVelocity(detProp.Efield(),detProp.Temperature());
689  //CM/TICK
690  drift_velocity = drift_velocity*0.5;
691  True_VertexT.push_back(True_VertX.back()/drift_velocity);
692  }
693  if (fSaveTruth)
694  FillTruth(MarlAssn, MarlTrue, kMarl);
695  }
696 
697  auto APATrue = evt.getHandle< std::vector<simb::MCTruth> >(fAPALabel);
698  if (APATrue) {
699  art::FindManyP<simb::MCParticle> APAAssn(APATrue,evt,fGEANTLabel);
700  FillMyMaps( APAParts, APAAssn, APATrue );
701  TotGen_APA = APAParts.size();
702  if(fSaveTruth) FillTruth(APAAssn , APATrue , kAPA );
703 
704  }
705 
706  auto CPATrue = evt.getHandle< std::vector<simb::MCTruth> >(fCPALabel);
707  if (CPATrue) {
708  art::FindManyP<simb::MCParticle> CPAAssn(CPATrue,evt,fGEANTLabel);
709  FillMyMaps( CPAParts, CPAAssn, CPATrue );
710  TotGen_CPA = CPAParts.size();
711  if(fSaveTruth) FillTruth(CPAAssn , CPATrue , kCPA );
712  }
713 
714  auto Ar39True = evt.getHandle< std::vector<simb::MCTruth> >(fAr39Label);
715  if (Ar39True) {
716  art::FindManyP<simb::MCParticle> Ar39Assn(Ar39True,evt,fGEANTLabel);
717  FillMyMaps( Ar39Parts, Ar39Assn, Ar39True );
718  TotGen_Ar39 = Ar39Parts.size();
719  if(fSaveTruth) FillTruth(Ar39Assn, Ar39True, kAr39);
720  }
721 
722  auto NeutTrue = evt.getHandle< std::vector<simb::MCTruth> >(fNeutLabel);
723  if (NeutTrue) {
724  art::FindManyP<simb::MCParticle> NeutAssn(NeutTrue,evt,fGEANTLabel);
725  FillMyMaps( NeutParts, NeutAssn, NeutTrue );
726  TotGen_Neut = NeutParts.size();
727  if(fSaveTruth) FillTruth(NeutAssn, NeutTrue, kNeut);
728  }
729 
730  auto KrypTrue = evt.getHandle< std::vector<simb::MCTruth> >(fKrypLabel);
731  if (KrypTrue) {
732  art::FindManyP<simb::MCParticle> KrypAssn(KrypTrue,evt,fGEANTLabel);
733  FillMyMaps( KrypParts, KrypAssn, KrypTrue );
734  TotGen_Kryp = KrypParts.size();
735  if(fSaveTruth) FillTruth(KrypAssn, KrypTrue, kKryp);
736  }
737 
738  auto PlonTrue = evt.getHandle< std::vector<simb::MCTruth> >(fPlonLabel);
739  if (PlonTrue) {
740  art::FindManyP<simb::MCParticle> PlonAssn(PlonTrue,evt,fGEANTLabel);
741  FillMyMaps( PlonParts, PlonAssn, PlonTrue );
742  TotGen_Plon = PlonParts.size();
743  if(fSaveTruth) FillTruth(PlonAssn, PlonTrue, kPlon);
744  }
745 
746  auto RdonTrue = evt.getHandle< std::vector<simb::MCTruth> >(fRdonLabel);
747  if (RdonTrue) {
748  art::FindManyP<simb::MCParticle> RdonAssn(RdonTrue,evt,fGEANTLabel);
749  FillMyMaps( RdonParts, RdonAssn, RdonTrue );
750  TotGen_Rdon = RdonParts.size();
751  if(fSaveTruth) FillTruth(RdonAssn, RdonTrue, kRdon);
752  }
753 
754  auto Ar42True = evt.getHandle< std::vector<simb::MCTruth> >(fAr42Label);
755  if (Ar42True) {
756  art::FindManyP<simb::MCParticle> Ar42Assn(Ar42True,evt,fGEANTLabel);
757  FillMyMaps( Ar42Parts, Ar42Assn, Ar42True );
758  TotGen_Ar42 = Ar42Parts.size();
759  if(fSaveTruth) FillTruth(Ar42Assn, Ar42True, kAr42);
760  }
761 
762  std::vector<simb::MCParticle> allTruthParts;
763  for(auto& it: APAParts)
764  allTruthParts.push_back(it.second);
765  for(auto& it: CPAParts)
766  allTruthParts.push_back(it.second);
767  for(auto& it: Ar39Parts)
768  allTruthParts.push_back(it.second);
769  for(auto& it: NeutParts)
770  allTruthParts.push_back(it.second);
771  for(auto& it: KrypParts)
772  allTruthParts.push_back(it.second);
773  for(auto& it: PlonParts)
774  allTruthParts.push_back(it.second);
775  for(auto& it: RdonParts)
776  allTruthParts.push_back(it.second);
777  for(auto& it: Ar42Parts)
778  allTruthParts.push_back(it.second);
779 
780  std::map<PType, std::map< int, simb::MCParticle >&> PTypeToMap{
781  {kMarl, MarlParts},
782  {kAPA, APAParts },
783  {kCPA, CPAParts },
784  {kAr39, Ar39Parts},
785  {kAr42, Ar42Parts},
786  {kNeut, NeutParts},
787  {kKryp, KrypParts},
788  {kPlon, PlonParts},
789  {kRdon, RdonParts}
790  };
791 
792  std::map<PType,std::set<int>> PTypeToTrackID;
793 
794  for(auto const& it : PTypeToMap){
795  const PType p=it.first;
796  auto const& m=it.second;
797  for(auto const& it2 : m){
798  trkIDToPType.insert(std::make_pair(it2.first, p));
799  PTypeToTrackID[p].insert(it2.first);
800  }
801  }
802 
803  mf::LogInfo(fname) << "THE EVENTS NUMBER IS: " << Event << std::endl;
804 
805  if (fSaveTPC) {
806  auto reco_hits = evt.getHandle< std::vector<recob::Hit> >(fHitLabel);
807  auto rawDigitsVecHandle = evt.getHandle< std::vector<raw::RawDigit> >(fRawDigitLabel);
808 
809  if ( reco_hits && rawDigitsVecHandle ) {
810  std::vector< recob::Hit > ColHits_Marl;
811  std::vector< recob::Hit > ColHits_CPA ;
812  std::vector< recob::Hit > ColHits_APA ;
813  std::vector< recob::Hit > ColHits_Ar39;
814  std::vector< recob::Hit > ColHits_Neut;
815  std::vector< recob::Hit > ColHits_Kryp;
816  std::vector< recob::Hit > ColHits_Plon;
817  std::vector< recob::Hit > ColHits_Rdon;
818  std::vector< recob::Hit > ColHits_Oth ;
819  std::vector< recob::Hit > ColHits_Ar42;
820 
821  NTotHit = reco_hits->size();
822  int colHitCount(0);
823  int LoopHits = NTotHit;
824 
825  for(int hit = 0; hit < LoopHits; ++hit) {
826  recob::Hit const& ThisHit = reco_hits->at(hit);
827  if(ThisHit.View() == geo::kU || ThisHit.View() == geo::kV) {
828  ++NIndHit;
829  } else {
830  ++NColHit;
831  }
832  }
833 
834 
835  // Fill a set of the channels that we don't want to consider in the
836  // adjacent-channel loop below. Do it here once so we don't have to
837  // re-do it for every single hit
838  std::set<int> badChannels;
839  for(size_t i=0; i<rawDigitsVecHandle->size(); ++i) {
840  int rawWireChannel=(*rawDigitsVecHandle)[i].Channel();
841  std::vector<geo::WireID> adjacentwire = geo->ChannelToWire(rawWireChannel);
842 
843  if (adjacentwire.size() < 1 || adjacentwire[0].Plane == geo::kU ||
844  adjacentwire[0].Plane == geo::kV){
845  badChannels.insert(rawWireChannel);
846  }
847  }
848  // std::cout << "Inserted " << badChannels.size() << " out of " << rawDigitsVecHandle->size() << " channels into set" << std::endl;
849 
850  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
851  for(int hit = 0; hit < LoopHits; ++hit) {
852  recob::Hit const& ThisHit = reco_hits->at(hit);
853 
854  if (ThisHit.View() == 2) {
855  std::vector<sim::TrackIDE> ThisHitIDE;
856  //GETTING HOLD OF THE SIM::IDEs.
857 
858  std::vector<const sim::IDE*> ThisSimIDE;
859  try {
860  // HitToTrackIDEs opens a specific window around the hit. I want a
861  // wider one, because the filtering can delay the hit. So this bit
862  // is a copy of HitToTrackIDEs from the backtracker, with some
863  // modification
864  const double start = ThisHit.PeakTime()-20;
865  const double end = ThisHit.PeakTime()+ThisHit.RMS()+20;
866  ThisHitIDE = bt_serv->ChannelToTrackIDEs(clockData, ThisHit.Channel(), start, end);
867 
868  // ThisHitIDE = bt_serv->HitToTrackIDEs(clockData, ThisHit );
869  } catch(...){
870  // std::cout << "FIRST CATCH" << std::endl;
871  firstCatch++;
872  try {
873  ThisSimIDE = bt_serv->HitToSimIDEs_Ps(clockData, ThisHit);
874  } catch(...) {
875  // std::cout << "SECOND CATCH" << std::endl;
876  secondCatch++;
877  // continue;
878  }
879  // continue;
880  }
881 
882  // Get the simIDEs.
883  try {
884  ThisSimIDE = bt_serv->HitToSimIDEs_Ps(clockData, ThisHit);
885  } catch(...) {
886  // std::cout << "THIRD CATCH" << std::endl;
887  thirdCatch++;
888  // continue;
889  }
890 
891  Hit_View.push_back(ThisHit.View());
892  Hit_Size.push_back(ThisHit.EndTick() - ThisHit.StartTick());
893  Hit_TPC .push_back(ThisHit.WireID().TPC);
894  int channel = ThisHit.Channel();
895  Hit_Chan.push_back(channel);
896 
898  SaveNeighbourADC(channel,rawDigitsVecHandle, badChannels, ThisHit);
899 
900  double wire_start[3] = {0,0,0};
901  double wire_end[3] = {0,0,0};
902  auto& wgeo = geo->WireIDToWireGeo(ThisHit.WireID());
903  wgeo.GetStart(wire_start);
904  wgeo.GetEnd(wire_end);
905  Hit_X_start.push_back(wire_start[0]);
906  Hit_Y_start.push_back(wire_start[1]);
907  Hit_Z_start.push_back(wire_start[2]);
908  Hit_X_end .push_back(wire_end[0]);
909  Hit_Y_end .push_back(wire_end[1]);
910  Hit_Z_end .push_back(wire_end[2]);
911  Hit_Time .push_back(ThisHit.PeakTime());
912  Hit_RMS .push_back(ThisHit.RMS());
913  Hit_SADC .push_back(ThisHit.SummedADC());
914  Hit_Int .push_back(ThisHit.Integral());
915  Hit_Peak .push_back(ThisHit.PeakAmplitude());
916  Hit_True_nIDEs.push_back(ThisHitIDE.size());
917 
918  if(ThisHitIDE.size()==0)
919  NHitNoBT++;
920 
921  //WHICH PARTICLE CONTRIBUTED MOST TO THE HIT.
922  double TopEFrac = -DBL_MAX;
923 
924  Hit_True_EvEnergy.push_back(0);
925  Hit_True_MainTrID.push_back(-1);
926  for (size_t ideL=0; ideL < ThisHitIDE.size(); ++ideL) {
927  Hit_True_TrackID.push_back(ThisHitIDE[ideL].trackID);
928  for (size_t ipart=0; ipart<allTruthParts.size(); ++ipart) {
929 
930  if (allTruthParts[ipart].TrackId() == ThisHitIDE[ideL].trackID) {
931  Hit_True_EvEnergy.at(colHitCount) += allTruthParts[ipart].E();
932  }
933  }
934  if (ThisHitIDE[ideL].energyFrac > TopEFrac) {
935  TopEFrac = ThisHitIDE[ideL].energyFrac;
936  Hit_True_MainTrID.at(colHitCount) = ThisHitIDE[ideL].trackID;
937 
938  }
939  }
940 
941  PType ThisPType = WhichParType(Hit_True_MainTrID.at(colHitCount));
942  Hit_True_GenType.push_back(ThisPType);
943 
944  int thisMarleyIndex=-1;
945  int MainTrID=Hit_True_MainTrID.at(colHitCount);
946  if(ThisPType==kMarl && MainTrID!=0){
947  auto const it=trkIDToMarleyIndex.find(MainTrID);
948  if(it==trkIDToMarleyIndex.end()){
949  mf::LogDebug(fname) << "Track ID " << MainTrID << " is not in Marley index map" << std::endl;
950  }
951  else{
952  thisMarleyIndex=it->second;
953  }
954  }
955  Hit_True_MarleyIndex.push_back(thisMarleyIndex);
956 
957  if(Hit_True_MainTrID[colHitCount] == -1)
958  {
959  Hit_True_X .push_back(-1);
960  Hit_True_Y .push_back(-1);
961  Hit_True_Z .push_back(-1);
962  Hit_True_Energy.push_back(-1);
963  Hit_True_nElec .push_back(-1);
964  }
965  else
966  {
967  for(unsigned int i = 0; i < ThisSimIDE.size(); i++)
968  {
969  if(ThisSimIDE.at(i)->trackID==Hit_True_MainTrID[colHitCount])
970  {
971  Hit_True_X .push_back(ThisSimIDE.at(i)->x );
972  Hit_True_Y .push_back(ThisSimIDE.at(i)->y );
973  Hit_True_Z .push_back(ThisSimIDE.at(i)->z );
974  Hit_True_Energy.push_back(ThisSimIDE.at(i)->energy );
975  Hit_True_nElec .push_back(ThisSimIDE.at(i)->numElectrons);
976  break;
977  }
978  }
979  }
980 
981  if (ThisPType == 0) { ColHits_Oth .push_back( ThisHit ); }
982  else if (ThisPType == 1) { ColHits_Marl.push_back( ThisHit ); }
983  else if (ThisPType == 2) { ColHits_APA .push_back( ThisHit ); }
984  else if (ThisPType == 3) { ColHits_CPA .push_back( ThisHit ); }
985  else if (ThisPType == 4) { ColHits_Ar39.push_back( ThisHit ); }
986  else if (ThisPType == 5) { ColHits_Neut.push_back( ThisHit ); }
987  else if (ThisPType == 6) { ColHits_Kryp.push_back( ThisHit ); }
988  else if (ThisPType == 7) { ColHits_Plon.push_back( ThisHit ); }
989  else if (ThisPType == 8) { ColHits_Rdon.push_back( ThisHit ); }
990  else if (ThisPType == 9) { ColHits_Ar42.push_back( ThisHit ); }
991 
992  colHitCount++;
993  }
994  }
995  mf::LogInfo(fname) << "Total of:\n"
996  << " - Other: " << ColHits_Oth.size() << " col plane hits\n"
997  << " - Marl : " << TotGen_Marl << " true parts\t| " << ColHits_Marl.size() << " col plane hits\n"
998  << " - APA : " << TotGen_APA << " true parts\t| " << ColHits_APA .size() << " col plane hits\n"
999  << " - CPA : " << TotGen_CPA << " true parts\t| " << ColHits_CPA .size() << " col plane hits\n"
1000  << " - Ar39 : " << TotGen_Ar39 << " true parts\t| " << ColHits_Ar39.size() << " col plane hits\n"
1001  << " - Neut : " << TotGen_Neut << " true parts\t| " << ColHits_Neut.size() << " col plane hits\n"
1002  << " - Kryp : " << TotGen_Kryp << " true parts\t| " << ColHits_Kryp.size() << " col plane hits\n"
1003  << " - Plon : " << TotGen_Plon << " true parts\t| " << ColHits_Plon.size() << " col plane hits\n"
1004  << " - Rdon : " << TotGen_Rdon << " true parts\t| " << ColHits_Rdon.size() << " col plane hits\n"
1005  << " - Ar42 : " << TotGen_Ar42 << " true parts\t| " << ColHits_Ar42.size() << " col plane hits\n";
1006  } else {
1007  mf::LogError(fname) << "Requested to save wire hits, but cannot load any wire hits";
1008  throw art::Exception(art::errors::NotFound) << "Requested to save wire hits, but cannot load any wire hits\n";
1009  }
1010  }
1011 
1012  if (fSavePDS) {
1013 
1014  std::vector<art::Ptr<recob::OpHit> > ophitlist;
1015  std::map<PType, std::vector<art::Ptr<recob::OpHit> > > map_of_ophit;
1016 
1017  auto OpHitHandle = evt.getHandle< std::vector< recob::OpHit > >(fOpHitModuleLabel);
1018  if (OpHitHandle) {
1019  art::fill_ptr_vector(ophitlist, OpHitHandle);
1020 
1021  mf::LogDebug(fname) << "There are " << ophitlist.size() << " optical hits in the event." << std::endl;
1022 
1023  for(size_t i = 0; i < ophitlist.size(); ++i)
1024  {
1025  std::vector<sim::TrackSDP> vec_tracksdp = pbt_serv->OpHitToTrackSDPs(ophitlist.at(i));
1026  PType gen = kUnknown;
1027 
1028  std::sort(vec_tracksdp.begin(), vec_tracksdp.end(),
1029  [](const sim::TrackSDP& a, const sim::TrackSDP& b) -> bool { return a.energyFrac > b.energyFrac; });
1030 
1031  for (size_t iSDP=0; iSDP<vec_tracksdp.size(); ++iSDP) {
1032  PDS_OpHit_True_TrackIDAll.push_back(vec_tracksdp[iSDP].trackID);
1033  PDS_OpHit_True_GenTypeAll.push_back(WhichParType(vec_tracksdp[iSDP].trackID));
1034  PDS_OpHit_True_EnergyAll .push_back(vec_tracksdp[iSDP].energy);
1035  PDS_OpHit_True_IndexAll .push_back((int)i);
1036  }
1037 
1038  if (vec_tracksdp.size()>0){
1039  int MainTrID = vec_tracksdp[0].trackID;
1040  PDS_OpHit_True_TrackID.push_back(vec_tracksdp[0].trackID);
1041  gen = WhichParType(vec_tracksdp[0].trackID);
1042  PDS_OpHit_True_GenType.push_back(gen);
1043  int thisMarleyIndex;
1044  if(gen==kMarl && MainTrID!=0){
1045  auto const it=trkIDToMarleyIndex.find(MainTrID);
1046  if(it==trkIDToMarleyIndex.end()){
1047  mf::LogDebug(fname) << "Track ID " << MainTrID << " is not in Marley index map" << std::endl;
1048  }
1049  else{
1050  thisMarleyIndex=it->second;
1051  }
1052  }
1053  PDS_OpHit_True_Index .push_back(thisMarleyIndex);
1054  PDS_OpHit_True_Energy .push_back(vec_tracksdp[0].energy);
1055  } else {
1056  PDS_OpHit_True_TrackID.push_back(-1);
1057  PDS_OpHit_True_GenType.push_back(kUnknown);
1058  PDS_OpHit_True_Energy .push_back(-1);
1059  }
1060 
1061  map_of_ophit[gen].push_back(ophitlist.at(i));
1062 
1063  double xyz_optdet[3]={0,0,0};
1064  double xyz_world [3]={0,0,0};
1065 
1066  geo->OpDetGeoFromOpChannel(ophitlist[i]->OpChannel()).LocalToWorld(xyz_optdet,xyz_world);
1067  PDS_OpHit_OpChannel .push_back(ophitlist[i]->OpChannel());
1068  PDS_OpHit_X .push_back(xyz_world[0]);
1069  PDS_OpHit_Y .push_back(xyz_world[1]);
1070  PDS_OpHit_Z .push_back(xyz_world[2]);
1071  PDS_OpHit_PeakTimeAbs .push_back(ophitlist[i]->PeakTimeAbs());
1072  PDS_OpHit_PeakTime .push_back(ophitlist[i]->PeakTime());
1073  PDS_OpHit_Frame .push_back(ophitlist[i]->Frame());
1074  PDS_OpHit_Width .push_back(ophitlist[i]->Width());
1075  PDS_OpHit_Area .push_back(ophitlist[i]->Area());
1076  PDS_OpHit_Amplitude .push_back(ophitlist[i]->Amplitude());
1077  PDS_OpHit_PE .push_back(ophitlist[i]->PE());
1078  PDS_OpHit_FastToTotal .push_back(ophitlist[i]->FastToTotal());
1079  }
1080  mf::LogInfo(fname) << "Total of :\n"
1081  << " - Other: " << map_of_ophit[kUnknown].size() << " opt hits\n"
1082  << " - Marl : " << TotGen_Marl << " true parts\t| " << map_of_ophit[kMarl].size() << " opt hits\n"
1083  << " - APA : " << TotGen_APA << " true parts\t| " << map_of_ophit[kAPA] .size() << " opt hits\n"
1084  << " - CPA : " << TotGen_CPA << " true parts\t| " << map_of_ophit[kCPA] .size() << " opt hits\n"
1085  << " - Ar39 : " << TotGen_Ar39 << " true parts\t| " << map_of_ophit[kAr39].size() << " opt hits\n"
1086  << " - Neut : " << TotGen_Neut << " true parts\t| " << map_of_ophit[kNeut].size() << " opt hits\n"
1087  << " - Kryp : " << TotGen_Kryp << " true parts\t| " << map_of_ophit[kKryp].size() << " opt hits\n"
1088  << " - Plon : " << TotGen_Plon << " true parts\t| " << map_of_ophit[kPlon].size() << " opt hits\n"
1089  << " - Rdon : " << TotGen_Rdon << " true parts\t| " << map_of_ophit[kRdon].size() << " opt hits\n"
1090  << " - Ar42 : " << TotGen_Ar42 << " true parts\t| " << map_of_ophit[kAr42].size() << " opt hits\n";
1091  }
1092  else {
1093  mf::LogError(fname) << "Requested to save optical hits, but cannot load any ophits";
1094  throw art::Exception(art::errors::NotFound) << "Requested to save optical hits, but cannot load any optical hits\n";
1095  }
1096  }
1097 
1098  if(fSaveIDEs) SaveIDEs(evt);
1099 
1100 
1101  fSNAnaTree->Fill();
1102 }
bool fSaveNeighbourADCs
end
while True: pbar.update(maxval-len(onlies[E][S])) #print iS, "/", len(onlies[E][S]) found = False for...
Index OpChannel(Index detNum, Index channel)
std::vector< double > PDS_OpHit_X
std::vector< int > PDS_OpHit_True_TrackID
int secondCatch
std::vector< float > True_VertY
std::vector< float > Hit_Peak
std::vector< float > True_Dirz
unsigned int event
Definition: DataStructs.h:636
std::vector< float > Hit_True_Energy
int TotGen_Neut
int TotGen_Plon
std::vector< float > True_MarlTime
std::vector< float > Hit_True_Z
std::vector< unsigned short > PDS_OpHit_Frame
int TotGen_Marl
unsigned int run
Definition: DataStructs.h:637
std::vector< int > Hit_Size
bool fSaveTPC
std::string fOpHitModuleLabel
std::vector< int > True_CCNC
void SaveNeighbourADC(int channel, art::Handle< std::vector< raw::RawDigit > >rawDigitsVecHandle, std::set< int > badChannels, recob::Hit const &hits)
std::string fname
std::vector< double > PDS_OpHit_PE
std::vector< float > True_Time
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
Planes which measure V.
Definition: geo_types.h:130
std::vector< double > PDS_OpHit_True_Energy
TTree * fSNAnaTree
geo::WireID WireID() const
Definition: Hit.h:233
std::vector< int > PDS_OpHit_True_IndexAll
float RMS() const
RMS of the hit shape, in tick units.
Definition: Hit.h:220
int thirdCatch
std::vector< double > Hit_X_end
The data type to uniquely identify a Plane.
Definition: geo_types.h:472
std::map< int, int > trkIDToMarleyIndex
std::string fHitLabel
std::vector< float > True_Py
int firstCatch
std::vector< double > Hit_Y_start
std::vector< float > Hit_SADC
bool fSavePDS
PType WhichParType(int TrID)
Planes which measure Z direction.
Definition: geo_types.h:132
std::string fAPALabel
std::vector< int > Hit_True_nIDEs
float Integral() const
Integral under the calibrated signal waveform of the hit, in tick x ADC units.
Definition: Hit.h:224
geo::View_t View() const
View for the plane of the hit.
Definition: Hit.h:232
double Width(Resonance_t res)
resonance width (GeV)
uint8_t channel
Definition: CRTFragment.hh:201
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
std::vector< int > Hit_View
std::vector< int > True_MarlSample
std::vector< float > Hit_Time
std::map< int, simb::MCParticle > RdonParts
std::vector< int > True_VertexChan
std::vector< int > True_HitNucleon
std::vector< double > PDS_OpHit_FastToTotal
SupernovaSamplingMode_t SamplingMode
Method used to sample the supernova neutrino&#39;s energy and arrival time.
float PeakAmplitude() const
The estimated amplitude of the hit at its peak, in ADC units.
Definition: Hit.h:221
std::vector< int > PDS_OpHit_OpChannel
void FillTruth(const art::FindManyP< simb::MCParticle > Assn, const art::Handle< std::vector< simb::MCTruth >> &Hand, const PType type)
std::vector< double > Hit_Z_start
int TotGen_Ar42
std::vector< float > True_ENu
double Weight
Statistical weight for this neutrino vertex.
std::string fRawDigitLabel
std::vector< float > True_Pz
std::string fRdonLabel
Planes which measure U.
Definition: geo_types.h:129
std::vector< float > Hit_RMS
std::string fMARLLabel
int NColHit
bool fSaveIDEs
IDparameter< geo::WireID > WireID
Member type of validated geo::WireID parameter.
std::vector< float > Hit_True_X
std::vector< int > Hit_True_GenType
std::vector< int > PDS_OpHit_True_Index
const double a
int Event
std::vector< int > PDS_OpHit_True_TrackIDAll
std::map< int, simb::MCParticle > MarlParts
float energyFrac
fraction of OpHit energy from the particle with this trackID
std::vector< int > True_Target
std::vector< sim::TrackSDP > OpHitToTrackSDPs(art::Ptr< recob::OpHit > const &opHit_P)
std::map< int, simb::MCParticle > Ar39Parts
int TotGen_CPA
p
Definition: test.py:223
std::vector< double > PDS_OpHit_Y
std::vector< double > PDS_OpHit_Z
std::vector< double > PDS_OpHit_True_EnergyAll
std::vector< float > Hit_Int
std::vector< int > Hit_True_MarleyIndex
std::string fAr42Label
std::string fKrypLabel
gen
Definition: demo.py:24
int NIndHit
void FillMyMaps(std::map< int, simb::MCParticle > &MyMap, art::FindManyP< simb::MCParticle > Assn, art::Handle< std::vector< simb::MCTruth > > Hand, std::map< int, int > *indexMap=nullptr)
std::vector< double > Hit_Z_end
std::vector< float > Hit_True_Y
raw::TDCtick_t StartTick() const
Initial tdc tick for hit.
Definition: Hit.h:216
std::string fGEANTLabel
std::vector< int > True_Nu_Lep_Type
void SaveIDEs(art::Event const &evt)
int TotGen_Rdon
art::ServiceHandle< cheat::PhotonBackTrackerService > pbt_serv
Detector simulation of raw signals on wires.
std::vector< float > True_VertX
std::vector< int > Hit_TPC
std::string fCPALabel
std::vector< float > True_VertexT
std::vector< double > PDS_OpHit_Amplitude
raw::TDCtick_t EndTick() const
Final tdc tick for hit.
Definition: Hit.h:217
std::vector< int > Hit_True_MainTrID
Ionization photons from a Geant4 track.
std::vector< int > True_Nu_Type
std::vector< double > PDS_OpHit_Area
void ResetVariables()
std::vector< float > Hit_True_EvEnergy
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::vector< double > PDS_OpHit_PeakTimeAbs
std::vector< int > Hit_True_TrackID
std::map< int, simb::MCParticle > NeutParts
float PeakTime() const
Time of the signal peak, in tick units.
Definition: Hit.h:218
std::vector< float > True_VertZ
int TotGen_APA
std::map< int, PType > trkIDToPType
std::vector< int > PDS_OpHit_True_GenType
std::string fPlonLabel
double SupernovaTime
Arrival time of the supernova neutrino (seconds)
std::map< int, simb::MCParticle > PlonParts
std::vector< int > Hit_Chan
std::vector< double > PDS_OpHit_Width
std::map< int, simb::MCParticle > APAParts
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
int NTotHit
std::vector< float > True_Dirx
std::vector< int > True_Mode
std::string fAr39Label
std::map< int, simb::MCParticle > CPAParts
std::vector< double > PDS_OpHit_PeakTime
std::map< int, simb::MCParticle > KrypParts
std::map< int, simb::MCParticle > Ar42Parts
static bool * b
Definition: config.cpp:1043
std::vector< double > Hit_Y_end
std::vector< float > True_Px
float SummedADC() const
The sum of calibrated ADC counts of the hit (0. by default)
Definition: Hit.h:223
std::vector< int > PDS_OpHit_True_GenTypeAll
unsigned int subRun
Definition: DataStructs.h:638
std::vector< float > True_ENu_Lep
int TotGen_Kryp
boost::graph_traits< ModuleGraph >::vertex_descriptor Vertex
Definition: ModuleGraph.h:25
std::vector< const sim::IDE * > HitToSimIDEs_Ps(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
2D representation of charge deposited in the TDC/wire plane
Definition: Hit.h:48
TCEvent evt
Definition: DataStructs.cxx:7
int TotGen_Ar39
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
Definition: Ptr.h:297
TPCID_t TPC
Index of the TPC within its cryostat.
Definition: geo_types.h:406
std::vector< float > Hit_True_nElec
int NHitNoBT
recob::tracking::Plane Plane
Definition: TrackState.h:17
LArSoft geometry interface.
Definition: ChannelGeo.h:16
std::string fNeutLabel
std::vector< double > Hit_X_start
std::vector< float > True_Diry
raw::ChannelID_t Channel() const
ID of the readout channel the hit was extracted from.
Definition: Hit.h:230
int SubRun
std::vector< float > True_MarlWeight
std::vector< sim::TrackIDE > ChannelToTrackIDEs(detinfo::DetectorClocksData const &clockData, raw::ChannelID_t channel, const double hit_start_time, const double hit_end_time) const
QTextStream & endl(QTextStream &s)
bool fSaveTruth
art::ServiceHandle< cheat::BackTrackerService > bt_serv
void SNAna::beginJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 450 of file SNAna_module.cc.

451 {
453 
454 
455  fSNAnaTree = tfs->make<TTree>("SNSimTree","SN simulation analysis tree");
456 
457  fSNAnaTree->Branch("Run" , &Run , "Run/I" );
458  fSNAnaTree->Branch("SubRun" , &SubRun , "SubRun/I" );
459  fSNAnaTree->Branch("Event" , &Event , "Event/I" );
460  fSNAnaTree->Branch("NTotHit" , &NTotHit , "NTotHits/I" );
461  fSNAnaTree->Branch("NColHit" , &NColHit , "NColHits/I" );
462  fSNAnaTree->Branch("NIndHit" , &NIndHit , "NIndHits/I" );
463  fSNAnaTree->Branch("NHitNoBT" , &NHitNoBT , "NHitNoBT/I" );
464 
465  if (fSaveTPC) {
466  fSNAnaTree->Branch("Hit_View" , &Hit_View );
467  fSNAnaTree->Branch("Hit_Size" , &Hit_Size );
468  fSNAnaTree->Branch("Hit_TPC" , &Hit_TPC );
469  fSNAnaTree->Branch("Hit_Chan" , &Hit_Chan );
470  fSNAnaTree->Branch("Hit_X_start" , &Hit_X_start );
471  fSNAnaTree->Branch("Hit_Y_start" , &Hit_Y_start );
472  fSNAnaTree->Branch("Hit_Z_start" , &Hit_Z_start );
473  fSNAnaTree->Branch("Hit_X_end" , &Hit_X_end );
474  fSNAnaTree->Branch("Hit_Y_end" , &Hit_Y_end );
475  fSNAnaTree->Branch("Hit_Z_end" , &Hit_Z_end );
476  fSNAnaTree->Branch("Hit_Time" , &Hit_Time );
477  fSNAnaTree->Branch("Hit_RMS" , &Hit_RMS );
478  fSNAnaTree->Branch("Hit_SADC" , &Hit_SADC );
479  fSNAnaTree->Branch("Hit_Int" , &Hit_Int );
480  fSNAnaTree->Branch("Hit_Peak" , &Hit_Peak );
481  fSNAnaTree->Branch("Hit_True_GenType" , &Hit_True_GenType );
482  fSNAnaTree->Branch("Hit_True_MainTrID" , &Hit_True_MainTrID );
483  fSNAnaTree->Branch("Hit_True_TrackID" , &Hit_True_TrackID );
484  fSNAnaTree->Branch("Hit_True_EvEnergy" , &Hit_True_EvEnergy );
485  fSNAnaTree->Branch("Hit_True_MarleyIndex" , &Hit_True_MarleyIndex );
486  fSNAnaTree->Branch("Hit_True_X" , &Hit_True_X );
487  fSNAnaTree->Branch("Hit_True_Y" , &Hit_True_Y );
488  fSNAnaTree->Branch("Hit_True_Z" , &Hit_True_Z );
489  fSNAnaTree->Branch("Hit_True_Energy" , &Hit_True_Energy );
490  fSNAnaTree->Branch("Hit_True_nElec" , &Hit_True_nElec );
491  fSNAnaTree->Branch("Hit_True_nIDEs" , &Hit_True_nIDEs );
492  }
493 
494  if (fSaveNeighbourADCs) {
495  fSNAnaTree->Branch("Hit_AdjM5SADC" , &Hit_AdjM5SADC );
496  fSNAnaTree->Branch("Hit_AdjM2SADC" , &Hit_AdjM2SADC );
497  fSNAnaTree->Branch("Hit_AdjM1SADC" , &Hit_AdjM1SADC );
498  fSNAnaTree->Branch("Hit_AdjP1SADC" , &Hit_AdjP1SADC );
499  fSNAnaTree->Branch("Hit_AdjP2SADC" , &Hit_AdjP2SADC );
500  fSNAnaTree->Branch("Hit_AdjP5SADC" , &Hit_AdjP5SADC );
501  fSNAnaTree->Branch("Hit_AdjM5Chan" , &Hit_AdjM5Chan );
502  fSNAnaTree->Branch("Hit_AdjM2Chan" , &Hit_AdjM2Chan );
503  fSNAnaTree->Branch("Hit_AdjM1Chan" , &Hit_AdjM1Chan );
504  fSNAnaTree->Branch("Hit_AdjP1Chan" , &Hit_AdjP1Chan );
505  fSNAnaTree->Branch("Hit_AdjP2Chan" , &Hit_AdjP2Chan );
506  fSNAnaTree->Branch("Hit_AdjP5Chan" , &Hit_AdjP5Chan );
507  }
508 
509  if (fSavePDS) {
510  fSNAnaTree->Branch("PDS_OpHit_OpChannel" , &PDS_OpHit_OpChannel );
511  fSNAnaTree->Branch("PDS_OpHit_X" , &PDS_OpHit_X );
512  fSNAnaTree->Branch("PDS_OpHit_Y" , &PDS_OpHit_Y );
513  fSNAnaTree->Branch("PDS_OpHit_Z" , &PDS_OpHit_Z );
514  fSNAnaTree->Branch("PDS_OpHit_PeakTimeAbs" , &PDS_OpHit_PeakTimeAbs );
515  fSNAnaTree->Branch("PDS_OpHit_PeakTime" , &PDS_OpHit_PeakTime );
516  fSNAnaTree->Branch("PDS_OpHit_Frame" , &PDS_OpHit_Frame );
517  fSNAnaTree->Branch("PDS_OpHit_Width" , &PDS_OpHit_Width );
518  fSNAnaTree->Branch("PDS_OpHit_Area" , &PDS_OpHit_Area );
519  fSNAnaTree->Branch("PDS_OpHit_Amplitude" , &PDS_OpHit_Amplitude );
520  fSNAnaTree->Branch("PDS_OpHit_PE" , &PDS_OpHit_PE );
521  fSNAnaTree->Branch("PDS_OpHit_FastToTotal" , &PDS_OpHit_FastToTotal );
522  fSNAnaTree->Branch("PDS_OpHit_True_GenType" , &PDS_OpHit_True_GenType );
523  fSNAnaTree->Branch("PDS_OpHit_True_Energy" , &PDS_OpHit_True_Energy );
524  fSNAnaTree->Branch("PDS_OpHit_True_TrackID" , &PDS_OpHit_True_TrackID );
525  fSNAnaTree->Branch("PDS_OpHit_True_GenTypeAll", &PDS_OpHit_True_GenTypeAll);
526  fSNAnaTree->Branch("PDS_OpHit_True_EnergyAll" , &PDS_OpHit_True_EnergyAll );
527  fSNAnaTree->Branch("PDS_OpHit_True_TrackIDAll", &PDS_OpHit_True_TrackIDAll);
528  fSNAnaTree->Branch("PDS_OpHit_True_IndexAll" , &PDS_OpHit_True_IndexAll );
529  }
530 
531  fSNAnaTree->Branch("True_VertexChan" , &True_VertexChan );
532  fSNAnaTree->Branch("True_Nu_Type" , &True_Nu_Type );
533  fSNAnaTree->Branch("True_Nu_Lep_Type" , &True_Nu_Lep_Type );
534  fSNAnaTree->Branch("True_Mode" , &True_Mode );
535  fSNAnaTree->Branch("True_CCNC" , &True_CCNC );
536  fSNAnaTree->Branch("True_HitNucleon" , &True_HitNucleon );
537  fSNAnaTree->Branch("True_Target" , &True_Target );
538  fSNAnaTree->Branch("True_MarlSample" , &True_MarlSample );
539  fSNAnaTree->Branch("True_MarlTime" , &True_MarlTime );
540  fSNAnaTree->Branch("True_MarlWeight" , &True_MarlWeight );
541  fSNAnaTree->Branch("True_ENu" , &True_ENu );
542  fSNAnaTree->Branch("True_ENu_Lep" , &True_ENu_Lep );
543  fSNAnaTree->Branch("True_VertX" , &True_VertX );
544  fSNAnaTree->Branch("True_VertY" , &True_VertY );
545  fSNAnaTree->Branch("True_VertZ" , &True_VertZ );
546  fSNAnaTree->Branch("True_VertexT" , &True_VertexT );
547  fSNAnaTree->Branch("True_Px" , &True_Px );
548  fSNAnaTree->Branch("True_Py" , &True_Py );
549  fSNAnaTree->Branch("True_Pz" , &True_Pz );
550  fSNAnaTree->Branch("True_Dirx" , &True_Dirx );
551  fSNAnaTree->Branch("True_Diry" , &True_Diry );
552  fSNAnaTree->Branch("True_Dirz" , &True_Dirz );
553  fSNAnaTree->Branch("True_Time" , &True_Time );
554 
555 
556  fSNAnaTree->Branch("True_Bck_Mode" , &True_Bck_Mode );
557  fSNAnaTree->Branch("True_Bck_PDG" , &True_Bck_PDG );
558  fSNAnaTree->Branch("True_Bck_ID" , &True_Bck_ID );
559  fSNAnaTree->Branch("True_Bck_Process" , &True_Bck_Process );
560  fSNAnaTree->Branch("True_Bck_EndProcess" , &True_Bck_EndProcess );
561  fSNAnaTree->Branch("True_Bck_Mother" , &True_Bck_Mother );
562  fSNAnaTree->Branch("True_Bck_P" , &True_Bck_P );
563  fSNAnaTree->Branch("True_Bck_VertX" , &True_Bck_VertX );
564  fSNAnaTree->Branch("True_Bck_VertY" , &True_Bck_VertY );
565  fSNAnaTree->Branch("True_Bck_VertZ" , &True_Bck_VertZ );
566  fSNAnaTree->Branch("True_Bck_Time" , &True_Bck_Time );
567  fSNAnaTree->Branch("True_Bck_Energy" , &True_Bck_Energy );
568  fSNAnaTree->Branch("True_Bck_EndX" , &True_Bck_EndX );
569  fSNAnaTree->Branch("True_Bck_EndY" , &True_Bck_EndY );
570  fSNAnaTree->Branch("True_Bck_EndZ" , &True_Bck_EndZ );
571  fSNAnaTree->Branch("True_Bck_EndT" , &True_Bck_EndT );
572  fSNAnaTree->Branch("True_Bck_EndE" , &True_Bck_EndE );
573 
574  // IDEs
575  if(fSaveIDEs) {
576  fSNAnaTree->Branch("NTotIDEs" , &NTotIDEs , "NTotIDEs/I" );
577  fSNAnaTree->Branch("IDEChannel" , &IDEChannel );
578  fSNAnaTree->Branch("IDEStartTime" , &IDEStartTime );
579  fSNAnaTree->Branch("IDEEndTime" , &IDEEndTime );
580  fSNAnaTree->Branch("IDEEnergy" , &IDEEnergy );
581  fSNAnaTree->Branch("IDEElectrons" , &IDEElectrons );
582  fSNAnaTree->Branch("IDEParticle" , &IDEParticle );
583  }
584 
585  fSNAnaTree->Branch("TotGen_Marl", &TotGen_Marl, "TotGen_Marl/I");
586  fSNAnaTree->Branch("TotGen_APA" , &TotGen_APA , "TotGen_APA/I" );
587  fSNAnaTree->Branch("TotGen_CPA" , &TotGen_CPA , "TotGen_CPA/I" );
588  fSNAnaTree->Branch("TotGen_Ar39", &TotGen_Ar39, "TotGen_Ar39/I");
589  fSNAnaTree->Branch("TotGen_Neut", &TotGen_Neut, "TotGen_Neut/I");
590  fSNAnaTree->Branch("TotGen_Kryp", &TotGen_Kryp, "TotGen_Kryp/I");
591  fSNAnaTree->Branch("TotGen_Plon", &TotGen_Plon, "TotGen_Plon/I");
592  fSNAnaTree->Branch("TotGen_Rdon", &TotGen_Rdon, "TotGen_Rdon/I");
593  fSNAnaTree->Branch("TotGen_Ar42", &TotGen_Ar42, "TotGen_Ar42/I");
594 
595 
596 }
bool fSaveNeighbourADCs
std::vector< int > True_Bck_ID
std::vector< int > Hit_AdjP1Chan
std::vector< double > PDS_OpHit_X
std::vector< int > PDS_OpHit_True_TrackID
std::vector< int > Hit_AdjP5Chan
std::vector< float > True_VertY
std::vector< float > Hit_Peak
std::vector< float > True_Dirz
std::vector< double > True_Bck_VertY
std::vector< float > Hit_True_Energy
int TotGen_Neut
int TotGen_Plon
std::vector< int > Hit_AdjM5SADC
std::vector< float > True_MarlTime
std::vector< float > Hit_True_Z
std::vector< unsigned short > PDS_OpHit_Frame
int TotGen_Marl
std::vector< int > Hit_Size
bool fSaveTPC
std::vector< double > True_Bck_EndE
std::vector< int > True_CCNC
std::vector< double > PDS_OpHit_PE
std::vector< float > True_Time
std::vector< double > PDS_OpHit_True_Energy
TTree * fSNAnaTree
std::vector< int > PDS_OpHit_True_IndexAll
std::vector< int > Hit_AdjM2SADC
std::vector< double > Hit_X_end
std::vector< float > True_Py
std::vector< double > True_Bck_P
std::vector< double > True_Bck_EndY
std::vector< double > True_Bck_VertZ
std::vector< double > Hit_Y_start
std::vector< float > Hit_SADC
bool fSavePDS
std::vector< int > True_Bck_Mode
std::vector< int > Hit_True_nIDEs
std::vector< int > Hit_View
std::vector< int > Hit_AdjP2SADC
std::vector< int > True_MarlSample
std::vector< float > Hit_Time
std::vector< int > True_VertexChan
std::vector< int > True_HitNucleon
std::vector< double > True_Bck_Energy
std::vector< double > PDS_OpHit_FastToTotal
std::vector< int > Hit_AdjP5SADC
std::vector< int > PDS_OpHit_OpChannel
std::vector< double > Hit_Z_start
int TotGen_Ar42
std::vector< float > True_ENu
std::vector< float > True_Pz
std::vector< float > Hit_RMS
int NColHit
bool fSaveIDEs
std::vector< float > Hit_True_X
std::vector< int > Hit_True_GenType
int Event
std::vector< int > PDS_OpHit_True_TrackIDAll
std::vector< int > True_Target
int TotGen_CPA
std::vector< double > PDS_OpHit_Y
std::vector< double > PDS_OpHit_Z
std::vector< double > PDS_OpHit_True_EnergyAll
std::vector< float > Hit_Int
std::vector< int > Hit_True_MarleyIndex
std::vector< double > True_Bck_VertX
int NIndHit
std::vector< double > Hit_Z_end
std::vector< float > Hit_True_Y
std::vector< int > True_Nu_Lep_Type
int TotGen_Rdon
std::vector< double > True_Bck_EndX
std::vector< int > Hit_AdjM2Chan
std::vector< int > IDEChannel
int NTotIDEs
std::vector< int > Hit_AdjM1Chan
std::vector< int > IDEStartTime
std::vector< int > True_Bck_Mother
std::vector< float > True_VertX
std::vector< int > Hit_AdjM1SADC
std::vector< int > Hit_TPC
std::vector< float > True_VertexT
std::vector< double > PDS_OpHit_Amplitude
std::vector< int > Hit_True_MainTrID
std::vector< int > Hit_AdjP1SADC
std::vector< int > True_Nu_Type
std::vector< double > PDS_OpHit_Area
std::vector< int > IDEEndTime
std::vector< float > Hit_True_EvEnergy
std::vector< double > PDS_OpHit_PeakTimeAbs
std::vector< int > Hit_True_TrackID
std::vector< float > True_VertZ
int TotGen_APA
std::vector< int > Hit_AdjM5Chan
std::vector< int > PDS_OpHit_True_GenType
std::vector< float > IDEElectrons
std::vector< float > IDEEnergy
std::vector< std::string > True_Bck_Process
std::vector< int > Hit_Chan
std::vector< double > PDS_OpHit_Width
int NTotHit
std::vector< float > True_Dirx
std::vector< int > True_Mode
std::vector< double > PDS_OpHit_PeakTime
std::vector< double > Hit_Y_end
std::vector< float > True_Px
std::vector< int > PDS_OpHit_True_GenTypeAll
std::vector< float > True_ENu_Lep
int TotGen_Kryp
std::vector< double > True_Bck_EndT
std::vector< int > True_Bck_PDG
std::vector< std::string > True_Bck_EndProcess
int TotGen_Ar39
std::vector< double > True_Bck_Time
std::vector< float > Hit_True_nElec
int NHitNoBT
std::vector< int > Hit_AdjP2Chan
std::vector< double > Hit_X_start
std::vector< float > True_Diry
int SubRun
std::vector< float > True_MarlWeight
std::vector< double > True_Bck_EndZ
std::vector< int > IDEParticle
void SNAna::endJob ( )
overridevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 1345 of file SNAna_module.cc.

1346 {
1347  mf::LogDebug(fname) << firstCatch << " " << secondCatch << " " << thirdCatch << std::endl;
1348 }
int secondCatch
std::string fname
int thirdCatch
int firstCatch
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
QTextStream & endl(QTextStream &s)
void SNAna::FillMyMaps ( std::map< int, simb::MCParticle > &  MyMap,
art::FindManyP< simb::MCParticle Assn,
art::Handle< std::vector< simb::MCTruth > >  Hand,
std::map< int, int > *  indexMap = nullptr 
)
private

Definition at line 1132 of file SNAna_module.cc.

1135  {
1136  for ( size_t L1=0; L1 < Hand->size(); ++L1 ) {
1137  for ( size_t L2=0; L2 < Assn.at(L1).size(); ++L2 ) {
1138  const simb::MCParticle ThisPar = (*Assn.at(L1).at(L2));
1139  MyMap[ThisPar.TrackId()] = ThisPar;
1140  if(indexMap) indexMap->insert({ThisPar.TrackId(), L1});
1141  }
1142  }
1143  return;
1144 }
int TrackId() const
Definition: MCParticle.h:210
void SNAna::FillTruth ( const art::FindManyP< simb::MCParticle Assn,
const art::Handle< std::vector< simb::MCTruth >> &  Hand,
const PType  type 
)
private

Definition at line 1104 of file SNAna_module.cc.

1106  {
1107 
1108  for(size_t i1=0; i1<Hand->size(); ++i1) {
1109  for ( size_t i2=0; i2 < Assn.at(i1).size(); ++i2 ) {
1110  const simb::MCParticle ThisPar = (*Assn.at(i1).at(i2));
1111  True_Bck_Mode .push_back(type);
1112  True_Bck_PDG .push_back(ThisPar.PdgCode ());
1113  True_Bck_ID .push_back(ThisPar.TrackId ());
1114  True_Bck_Mother .push_back(ThisPar.Mother ());
1115  True_Bck_P .push_back(ThisPar.P ());
1116  True_Bck_VertX .push_back(ThisPar.Vx ());
1117  True_Bck_VertY .push_back(ThisPar.Vy ());
1118  True_Bck_VertZ .push_back(ThisPar.Vz ());
1119  True_Bck_Time .push_back(ThisPar.T ());
1120  True_Bck_Energy .push_back(ThisPar.E ());
1121  True_Bck_EndX .push_back(ThisPar.EndX ());
1122  True_Bck_EndY .push_back(ThisPar.EndY ());
1123  True_Bck_EndZ .push_back(ThisPar.EndZ ());
1124  True_Bck_EndT .push_back(ThisPar.EndT ());
1125  True_Bck_EndE .push_back(ThisPar.EndE ());
1126  True_Bck_EndProcess.push_back(ThisPar.EndProcess());
1127  True_Bck_Process .push_back(ThisPar.Process ());
1128  }
1129  }
1130 }
double E(const int i=0) const
Definition: MCParticle.h:233
std::vector< int > True_Bck_ID
int PdgCode() const
Definition: MCParticle.h:212
std::vector< double > True_Bck_VertY
double EndE() const
Definition: MCParticle.h:244
double EndZ() const
Definition: MCParticle.h:228
std::vector< double > True_Bck_EndE
int Mother() const
Definition: MCParticle.h:213
std::vector< double > True_Bck_P
std::vector< double > True_Bck_EndY
std::vector< double > True_Bck_VertZ
std::vector< int > True_Bck_Mode
std::string Process() const
Definition: MCParticle.h:215
double EndY() const
Definition: MCParticle.h:227
std::vector< double > True_Bck_Energy
int TrackId() const
Definition: MCParticle.h:210
std::string EndProcess() const
Definition: MCParticle.h:216
double P(const int i=0) const
Definition: MCParticle.h:234
double T(const int i=0) const
Definition: MCParticle.h:224
std::vector< double > True_Bck_VertX
double EndT() const
Definition: MCParticle.h:229
std::vector< double > True_Bck_EndX
std::vector< int > True_Bck_Mother
double Vx(const int i=0) const
Definition: MCParticle.h:221
std::vector< std::string > True_Bck_Process
double Vz(const int i=0) const
Definition: MCParticle.h:223
std::vector< double > True_Bck_EndT
std::vector< int > True_Bck_PDG
std::vector< std::string > True_Bck_EndProcess
std::vector< double > True_Bck_Time
double EndX() const
Definition: MCParticle.h:226
double Vy(const int i=0) const
Definition: MCParticle.h:222
std::vector< double > True_Bck_EndZ
bool SNAna::InMyMap ( int  TrID,
std::map< int, simb::MCParticle ParMap 
)
private

Definition at line 1159 of file SNAna_module.cc.

1160 {
1162  ParIt = ParMap.find( TrID );
1163  if ( ParIt != ParMap.end() ) {
1164  return true;
1165  } else
1166  return false;
1167 }
intermediate_table::iterator iterator
SNAna& SNAna::operator= ( SNAna const &  )
delete
SNAna& SNAna::operator= ( SNAna &&  )
delete
void SNAna::reconfigure ( fhicl::ParameterSet const &  p)

Definition at line 284 of file SNAna_module.cc.

285 {
286 
287  fRawDigitLabel = p.get<std::string>("RawDigitLabel" );
288  fHitLabel = p.get<std::string>("HitLabel" );
289  fCalDataModuleLabel = p.get<std::string>("CalDataModuleLabel");
290  fOpHitModuleLabel = p.get<std::string>("OpHitModuleLabel" );
291 
292  fGEANTLabel = p.get<std::string> ("GEANT4Label" );
293  fMARLLabel = p.get<std::string> ("MARLEYLabel" );
294  fAPALabel = p.get<std::string> ("APALabel" );
295  fCPALabel = p.get<std::string> ("CPALabel" );
296  fAr39Label = p.get<std::string> ("Argon39Label" );
297  fNeutLabel = p.get<std::string> ("NeutronLabel" );
298  fKrypLabel = p.get<std::string> ("KryptonLabel" );
299  fPlonLabel = p.get<std::string> ("PoloniumLabel");
300  fRdonLabel = p.get<std::string> ("RadonLabel" );
301  fAr42Label = p.get<std::string> ("Argon42Label" );
302 
303  fSaveNeighbourADCs = p.get<bool> ("SaveNeighbourADCs",0);
304  fSaveTruth = p.get<bool>("SaveTruth",0);
305  fSaveIDEs = p.get<bool>("SaveIDEs",0);
306  fSaveTPC = p.get<bool>("SaveTPC",1);
307  fSavePDS = p.get<bool>("SavePDS",1);
308 
309  mf::LogInfo(fname) << "Reconfigured " << this->processName() << " with "
310  << " SaveNeighbourADCs: " << std::boolalpha << fSaveNeighbourADCs
311  << " SaveTruth: " << std::boolalpha << fSaveTruth
312  << " SaveIDEs: " << std::boolalpha << fSaveIDEs << std::endl;
313 }
bool fSaveNeighbourADCs
std::string const & processName() const
Definition: Observer.cc:68
std::string fCalDataModuleLabel
bool fSaveTPC
std::string fOpHitModuleLabel
std::string fname
std::string string
Definition: nybbler.cc:12
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string fHitLabel
bool fSavePDS
std::string fAPALabel
std::string fRawDigitLabel
std::string fRdonLabel
std::string fMARLLabel
bool fSaveIDEs
p
Definition: test.py:223
std::string fAr42Label
std::string fKrypLabel
std::string fGEANTLabel
std::string fCPALabel
std::string fPlonLabel
std::string fAr39Label
std::string fNeutLabel
QTextStream & endl(QTextStream &s)
bool fSaveTruth
void SNAna::ResetVariables ( )
private

Definition at line 316 of file SNAna_module.cc.

317 {
318  trkIDToPType.clear();
319 
320  MarlParts.clear(); APAParts .clear(); CPAParts .clear(); Ar39Parts.clear();
321  NeutParts.clear(); KrypParts.clear(); PlonParts.clear(); RdonParts.clear();
322  Ar42Parts.clear();
323 
324  Run = SubRun = Event = -1;
325 
328  TotGen_Ar42 = 0;
329 
330  NTotHit = 0;
331  NColHit = 0;
332  NIndHit = 0;
333  NHitNoBT = 0;
334 
335  Hit_View .clear();
336  Hit_Size .clear();
337  Hit_TPC .clear();
338  Hit_Chan .clear();
339  Hit_X_start .clear();
340  Hit_Y_start .clear();
341  Hit_Z_start .clear();
342  Hit_X_end .clear();
343  Hit_Y_end .clear();
344  Hit_Z_end .clear();
345  Hit_Time .clear();
346  Hit_RMS .clear();
347  Hit_SADC .clear();
348  Hit_Int .clear();
349  Hit_Peak .clear();
350  Hit_True_GenType .clear();
351  Hit_True_MainTrID .clear();
352  Hit_True_TrackID .clear();
353  Hit_True_EvEnergy .clear();
354  Hit_True_MarleyIndex .clear();
355  Hit_True_X .clear();
356  Hit_True_Y .clear();
357  Hit_True_Z .clear();
358  Hit_True_Energy .clear();
359  Hit_True_nElec .clear();
360  Hit_True_nIDEs .clear();
361 
362  Hit_AdjM5SADC .clear();
363  Hit_AdjM2SADC .clear();
364  Hit_AdjM1SADC .clear();
365  Hit_AdjP1SADC .clear();
366  Hit_AdjP2SADC .clear();
367  Hit_AdjP5SADC .clear();
368  Hit_AdjM5Chan .clear();
369  Hit_AdjM2Chan .clear();
370  Hit_AdjM1Chan .clear();
371  Hit_AdjP1Chan .clear();
372  Hit_AdjP2Chan .clear();
373  Hit_AdjP5Chan .clear();
374 
375  PDS_OpHit_OpChannel .clear();
376  PDS_OpHit_X .clear();
377  PDS_OpHit_Y .clear();
378  PDS_OpHit_Z .clear();
379  PDS_OpHit_PeakTimeAbs .clear();
380  PDS_OpHit_PeakTime .clear();
381  PDS_OpHit_Frame .clear();
382  PDS_OpHit_Width .clear();
383  PDS_OpHit_Area .clear();
384  PDS_OpHit_Amplitude .clear();
385  PDS_OpHit_PE .clear();
386  PDS_OpHit_FastToTotal .clear();
387  PDS_OpHit_True_GenType .clear();
388  PDS_OpHit_True_Index .clear();
389  PDS_OpHit_True_Energy .clear();
390  PDS_OpHit_True_TrackID .clear();
392  PDS_OpHit_True_EnergyAll .clear();
394  PDS_OpHit_True_IndexAll .clear();
395 
396  True_VertexChan .clear();
397  True_Nu_Type .clear();
398  True_Nu_Lep_Type .clear();
399  True_Mode .clear();
400  True_CCNC .clear();
401  True_HitNucleon .clear();
402  True_Target .clear();
403  True_MarlSample .clear();
404  True_MarlTime .clear();
405  True_MarlWeight .clear();
406  True_ENu .clear();
407  True_ENu_Lep .clear();
408  True_VertX .clear();
409  True_VertY .clear();
410  True_VertZ .clear();
411  True_VertexT .clear();
412  True_Px .clear();
413  True_Py .clear();
414  True_Pz .clear();
415  True_Dirx .clear();
416  True_Diry .clear();
417  True_Dirz .clear();
418  True_Time .clear();
419 
420  True_Bck_Mode .clear();
421  True_Bck_PDG .clear();
422  True_Bck_ID .clear();
423  True_Bck_Process .clear();
424  True_Bck_EndProcess .clear();
425  True_Bck_Mother .clear();
426  True_Bck_P .clear();
427  True_Bck_VertX .clear();
428  True_Bck_VertY .clear();
429  True_Bck_VertZ .clear();
430  True_Bck_Time .clear();
431  True_Bck_Energy .clear();
432  True_Bck_EndX .clear();
433  True_Bck_EndY .clear();
434  True_Bck_EndZ .clear();
435  True_Bck_EndT .clear();
436  True_Bck_EndE .clear();
437 
438  // IDEs
439  NTotIDEs=0;
440  IDEChannel .clear();
441  IDEStartTime .clear();
442  IDEEndTime .clear();
443  IDEEnergy .clear();
444  IDEElectrons .clear();
445  IDEParticle .clear();
446 
447 }
std::vector< int > True_Bck_ID
std::vector< int > Hit_AdjP1Chan
std::vector< double > PDS_OpHit_X
std::vector< int > PDS_OpHit_True_TrackID
std::vector< int > Hit_AdjP5Chan
std::vector< float > True_VertY
std::vector< float > Hit_Peak
std::vector< float > True_Dirz
std::vector< double > True_Bck_VertY
std::vector< float > Hit_True_Energy
int TotGen_Neut
int TotGen_Plon
std::vector< int > Hit_AdjM5SADC
std::vector< float > True_MarlTime
std::vector< float > Hit_True_Z
std::vector< unsigned short > PDS_OpHit_Frame
int TotGen_Marl
std::vector< int > Hit_Size
std::vector< double > True_Bck_EndE
std::vector< int > True_CCNC
std::vector< double > PDS_OpHit_PE
std::vector< float > True_Time
std::vector< double > PDS_OpHit_True_Energy
std::vector< int > PDS_OpHit_True_IndexAll
std::vector< int > Hit_AdjM2SADC
std::vector< double > Hit_X_end
std::vector< float > True_Py
std::vector< double > True_Bck_P
std::vector< double > True_Bck_EndY
std::vector< double > True_Bck_VertZ
std::vector< double > Hit_Y_start
std::vector< float > Hit_SADC
std::vector< int > True_Bck_Mode
std::vector< int > Hit_True_nIDEs
std::vector< int > Hit_View
std::vector< int > Hit_AdjP2SADC
std::vector< int > True_MarlSample
std::vector< float > Hit_Time
std::map< int, simb::MCParticle > RdonParts
std::vector< int > True_VertexChan
std::vector< int > True_HitNucleon
std::vector< double > True_Bck_Energy
std::vector< double > PDS_OpHit_FastToTotal
std::vector< int > Hit_AdjP5SADC
std::vector< int > PDS_OpHit_OpChannel
std::vector< double > Hit_Z_start
int TotGen_Ar42
std::vector< float > True_ENu
std::vector< float > True_Pz
std::vector< float > Hit_RMS
int NColHit
std::vector< float > Hit_True_X
std::vector< int > Hit_True_GenType
std::vector< int > PDS_OpHit_True_Index
int Event
std::vector< int > PDS_OpHit_True_TrackIDAll
std::map< int, simb::MCParticle > MarlParts
std::vector< int > True_Target
std::map< int, simb::MCParticle > Ar39Parts
int TotGen_CPA
std::vector< double > PDS_OpHit_Y
std::vector< double > PDS_OpHit_Z
std::vector< double > PDS_OpHit_True_EnergyAll
std::vector< float > Hit_Int
std::vector< int > Hit_True_MarleyIndex
std::vector< double > True_Bck_VertX
int NIndHit
std::vector< double > Hit_Z_end
std::vector< float > Hit_True_Y
std::vector< int > True_Nu_Lep_Type
int TotGen_Rdon
std::vector< double > True_Bck_EndX
std::vector< int > Hit_AdjM2Chan
std::vector< int > IDEChannel
int NTotIDEs
std::vector< int > Hit_AdjM1Chan
std::vector< int > IDEStartTime
std::vector< int > True_Bck_Mother
std::vector< float > True_VertX
std::vector< int > Hit_AdjM1SADC
std::vector< int > Hit_TPC
std::vector< float > True_VertexT
std::vector< double > PDS_OpHit_Amplitude
std::vector< int > Hit_True_MainTrID
std::vector< int > Hit_AdjP1SADC
std::vector< int > True_Nu_Type
std::vector< double > PDS_OpHit_Area
std::vector< int > IDEEndTime
std::vector< float > Hit_True_EvEnergy
std::vector< double > PDS_OpHit_PeakTimeAbs
std::vector< int > Hit_True_TrackID
std::map< int, simb::MCParticle > NeutParts
std::vector< float > True_VertZ
int TotGen_APA
std::vector< int > Hit_AdjM5Chan
std::map< int, PType > trkIDToPType
std::vector< int > PDS_OpHit_True_GenType
std::vector< float > IDEElectrons
std::vector< float > IDEEnergy
std::map< int, simb::MCParticle > PlonParts
std::vector< std::string > True_Bck_Process
std::vector< int > Hit_Chan
std::vector< double > PDS_OpHit_Width
std::map< int, simb::MCParticle > APAParts
int NTotHit
std::vector< float > True_Dirx
std::vector< int > True_Mode
std::map< int, simb::MCParticle > CPAParts
std::vector< double > PDS_OpHit_PeakTime
std::map< int, simb::MCParticle > KrypParts
std::map< int, simb::MCParticle > Ar42Parts
std::vector< double > Hit_Y_end
std::vector< float > True_Px
std::vector< int > PDS_OpHit_True_GenTypeAll
std::vector< float > True_ENu_Lep
int TotGen_Kryp
std::vector< double > True_Bck_EndT
std::vector< int > True_Bck_PDG
std::vector< std::string > True_Bck_EndProcess
int TotGen_Ar39
std::vector< double > True_Bck_Time
std::vector< float > Hit_True_nElec
int NHitNoBT
std::vector< int > Hit_AdjP2Chan
std::vector< double > Hit_X_start
std::vector< float > True_Diry
int SubRun
std::vector< float > True_MarlWeight
std::vector< double > True_Bck_EndZ
std::vector< int > IDEParticle
void SNAna::SaveIDEs ( art::Event const &  evt)
private

Definition at line 1170 of file SNAna_module.cc.

1171 {
1172  auto allParticles = evt.getValidHandle<std::vector<simb::MCParticle> >(fGEANTLabel);
1173  art::FindMany<simb::MCTruth> assn(allParticles,evt,fGEANTLabel);
1174  std::map<int, const simb::MCTruth*> idToTruth;
1175  for(size_t i=0; i<allParticles->size(); ++i){
1176  const simb::MCParticle& particle=allParticles->at(i);
1177  const std::vector<const simb::MCTruth*> truths=assn.at(i);
1178  if(truths.size()==1){
1179  idToTruth[particle.TrackId()]=truths[0];
1180  }
1181  else{
1182  mf::LogDebug("DAQSimAna") << "Particle " << particle.TrackId() << " has " << truths.size() << " truths";
1183  idToTruth[particle.TrackId()]=nullptr;
1184  }
1185  }
1186 
1187  // Get the SimChannels so we can see where the actual energy depositions were
1188  auto& simchs=*evt.getValidHandle<std::vector<sim::SimChannel>>("largeant");
1189 
1190  for(auto&& simch: simchs){
1191  // We only care about collection channels
1192  if(geo->SignalType(simch.Channel())!=geo::kCollection) continue;
1193 
1194  // The IDEs record energy depositions at every tick, but
1195  // mostly we have several depositions at contiguous times. So
1196  // we're going to save just one output IDE for each contiguous
1197  // block of hits on a channel. Each item in vector is a list
1198  // of (TDC, IDE*) for contiguous-in-time IDEs
1199  std::vector<std::vector<std::pair<int, const sim::IDE*> > > contigIDEs;
1200  int prevTDC=0;
1201  for (const auto& TDCinfo: simch.TDCIDEMap()) {
1202  // Do we need to start a new group of IDEs? Yes if this is
1203  // the first IDE in this channel. Yes if this IDE is not
1204  // contiguous with the previous one
1205  if(contigIDEs.empty() || TDCinfo.first-prevTDC>5){
1206  contigIDEs.push_back(std::vector<std::pair<int, const sim::IDE*> >());
1207  }
1208  std::vector<std::pair<int, const sim::IDE*> >& currentIDEs=contigIDEs.back();
1209 
1210  // Add all the current tick's IDEs to the list
1211  for (const sim::IDE& ide: TDCinfo.second) {
1212  currentIDEs.push_back(std::make_pair(TDCinfo.first, &ide));
1213  }
1214  prevTDC=TDCinfo.first;
1215  }
1216 
1217  for(auto const& contigs : contigIDEs){
1218  float energy=0;
1219  float electrons=0;
1220  int startTime=99999;
1221  int endTime=0;
1222  std::map<PType, float> ptypeToEnergy;
1223  for(auto const& timeide : contigs){
1224  const int tdc=timeide.first;
1225  startTime=std::min(tdc, startTime);
1226  endTime=std::max(tdc, endTime);
1227  const sim::IDE& ide=*timeide.second;
1228  const float thisEnergy=ide.energy;
1229  const PType thisPType=WhichParType(std::abs(ide.trackID));
1230  energy+=thisEnergy;
1231  electrons+=ide.numElectrons;
1232  ptypeToEnergy[thisPType]+=thisEnergy;
1233  }
1234  float bestEnergy=0;
1235  PType bestPType=kUnknown;
1236  for(auto const& it : ptypeToEnergy){
1237  if(it.second>bestEnergy){
1238  bestEnergy=it.second;
1239  bestPType=it.first;
1240  }
1241  }
1242  // Ignore anything past the end of the readout window
1243  if(startTime<4492){
1244  IDEChannel.push_back(simch.Channel());
1245  IDEStartTime.push_back(startTime);
1246  IDEEndTime.push_back(endTime);
1247  IDEEnergy.push_back(energy);
1248  IDEElectrons.push_back(electrons);
1249  IDEParticle.push_back(bestPType);
1250  }
1251  } // loop over our compressed IDEs
1252  } // loop over SimChannels
1253 }
TrackID_t trackID
Geant4 supplied track ID.
Definition: SimChannel.h:112
struct vector vector
PType WhichParType(int TrID)
int TrackId() const
Definition: MCParticle.h:210
T abs(T value)
Ionization at a point of the TPC sensitive volume.
Definition: SimChannel.h:84
float energy
energy deposited by ionization by this track ID and time [MeV]
Definition: SimChannel.h:114
static int max(int a, int b)
std::string fGEANTLabel
std::vector< int > IDEChannel
std::vector< int > IDEStartTime
std::vector< int > IDEEndTime
std::vector< float > IDEElectrons
std::vector< float > IDEEnergy
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
TCEvent evt
Definition: DataStructs.cxx:7
LArSoft geometry interface.
Definition: ChannelGeo.h:16
float numElectrons
number of electrons at the readout for this track ID and time
Definition: SimChannel.h:113
Signal from collection planes.
Definition: geo_types.h:146
std::vector< int > IDEParticle
void SNAna::SaveNeighbourADC ( int  channel,
art::Handle< std::vector< raw::RawDigit > >  rawDigitsVecHandle,
std::set< int >  badChannels,
recob::Hit const &  hits 
)
private

Definition at line 1256 of file SNAna_module.cc.

1259  {
1260 
1261  Hit_AdjM5SADC.push_back(0);
1262  Hit_AdjM2SADC.push_back(0);
1263  Hit_AdjM1SADC.push_back(0);
1264  Hit_AdjP1SADC.push_back(0);
1265  Hit_AdjP2SADC.push_back(0);
1266  Hit_AdjP5SADC.push_back(0);
1267  Hit_AdjM5Chan.push_back(0);
1268  Hit_AdjM2Chan.push_back(0);
1269  Hit_AdjM1Chan.push_back(0);
1270  Hit_AdjP1Chan.push_back(0);
1271  Hit_AdjP2Chan.push_back(0);
1272  Hit_AdjP5Chan.push_back(0);
1273  int colHitCount = Hit_AdjM1Chan.size()-1;
1274 
1275  // A vector for us to uncompress the rawdigits into. Create it
1276  // outside the loop here so that we only have to allocate it once
1277  raw::RawDigit::ADCvector_t ADCs((*rawDigitsVecHandle)[0].Samples());
1278 
1279  std::vector<geo::WireID> wids = geo->ChannelToWire(channel);
1280  for(size_t i=0; i<rawDigitsVecHandle->size(); ++i)
1281  {
1282  int rawWireChannel=(*rawDigitsVecHandle)[i].Channel();
1283  const int chanDiff=rawWireChannel-channel;
1284  if(abs(chanDiff)!=1 && abs(chanDiff)!=2 && abs(chanDiff)!=5) continue;
1285 
1286  if(badChannels.find(rawWireChannel)!=badChannels.end()) continue;
1287 
1288  switch(chanDiff)
1289  {
1290  case -5:
1291  Hit_AdjM5SADC[colHitCount] = 0;
1292  Hit_AdjM5Chan[colHitCount] = rawWireChannel;
1293  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1294  (*rawDigitsVecHandle)[i].Compression());
1295  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1296  Hit_AdjM5SADC[colHitCount]+=ADCs[i];
1297  break;
1298  case -2:
1299  Hit_AdjM2SADC[colHitCount] = 0;
1300  Hit_AdjM2Chan[colHitCount] = rawWireChannel;
1301  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1302  (*rawDigitsVecHandle)[i].Compression());
1303  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1304  Hit_AdjM2SADC[colHitCount]+=ADCs[i];
1305  break;
1306  case -1:
1307  Hit_AdjM1SADC[colHitCount] = 0;
1308  Hit_AdjM1Chan[colHitCount] = rawWireChannel;
1309  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1310  (*rawDigitsVecHandle)[i].Compression());
1311  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1312  Hit_AdjM1SADC[colHitCount]+=ADCs[i];
1313  break;
1314  case 1:
1315  Hit_AdjP1SADC[colHitCount] = 0;
1316  Hit_AdjP1Chan[colHitCount] = rawWireChannel;
1317  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1318  (*rawDigitsVecHandle)[i].Compression());
1319  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1320  Hit_AdjP1SADC[colHitCount]+=ADCs[i];
1321  break;
1322  case 2:
1323  Hit_AdjP2SADC[colHitCount] = 0;
1324  Hit_AdjP2Chan[colHitCount] = rawWireChannel;
1325  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1326  (*rawDigitsVecHandle)[i].Compression());
1327  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1328  Hit_AdjP2SADC[colHitCount]+=ADCs[i];
1329  break;
1330  case 5:
1331  Hit_AdjP5SADC[colHitCount] = 0;
1332  Hit_AdjP5Chan[colHitCount] = rawWireChannel;
1333  raw::Uncompress((*rawDigitsVecHandle)[i].ADCs(), ADCs,
1334  (*rawDigitsVecHandle)[i].Compression());
1335  for(int i=ThisHit.StartTick(); i<=ThisHit.EndTick();++i)
1336  Hit_AdjP5SADC[colHitCount]+=ADCs[i];
1337  break;
1338  default:
1339  break;
1340  }
1341  }
1342 }
std::vector< int > Hit_AdjP1Chan
std::vector< int > Hit_AdjP5Chan
std::vector< int > Hit_AdjM5SADC
std::vector< int > Hit_AdjM2SADC
std::vector< short > ADCvector_t
Type representing a (compressed) vector of ADC counts.
Definition: RawDigit.h:73
uint8_t channel
Definition: CRTFragment.hh:201
std::vector< int > Hit_AdjP2SADC
std::vector< int > Hit_AdjP5SADC
T abs(T value)
std::vector< int > Hit_AdjM2Chan
std::vector< int > Hit_AdjM1Chan
std::vector< int > Hit_AdjM1SADC
std::vector< int > Hit_AdjP1SADC
std::vector< int > Hit_AdjM5Chan
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
Definition: raw.cxx:776
std::vector< int > Hit_AdjP2Chan
LArSoft geometry interface.
Definition: ChannelGeo.h:16
PType SNAna::WhichParType ( int  TrID)
private

Definition at line 1147 of file SNAna_module.cc.

1148 {
1149  PType ThisPType = kUnknown;
1150  auto const& it=trkIDToPType.find(TrID);
1151  if(it!=trkIDToPType.end()){
1152  ThisPType=it->second;
1153  }
1154  return ThisPType;
1155 
1156 }
std::map< int, PType > trkIDToPType

Member Data Documentation

std::map< int, simb::MCParticle > SNAna::APAParts
private

Definition at line 117 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::Ar39Parts
private

Definition at line 119 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::Ar42Parts
private

Definition at line 124 of file SNAna_module.cc.

Definition at line 271 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::CPAParts
private

Definition at line 118 of file SNAna_module.cc.

int SNAna::Event
private

Definition at line 142 of file SNAna_module.cc.

std::string SNAna::fAPALabel
private

Definition at line 117 of file SNAna_module.cc.

std::string SNAna::fAr39Label
private

Definition at line 119 of file SNAna_module.cc.

std::string SNAna::fAr42Label
private

Definition at line 124 of file SNAna_module.cc.

std::string SNAna::fCalDataModuleLabel
private

Definition at line 112 of file SNAna_module.cc.

std::string SNAna::fCPALabel
private

Definition at line 118 of file SNAna_module.cc.

std::string SNAna::fGEANTLabel
private

Definition at line 115 of file SNAna_module.cc.

std::string SNAna::fHitLabel
private

Definition at line 111 of file SNAna_module.cc.

int SNAna::firstCatch
private

Definition at line 106 of file SNAna_module.cc.

std::string SNAna::fKrypLabel
private

Definition at line 121 of file SNAna_module.cc.

std::string SNAna::fMARLLabel
private

Definition at line 116 of file SNAna_module.cc.

std::string SNAna::fname
private

Definition at line 104 of file SNAna_module.cc.

std::string SNAna::fNeutLabel
private

Definition at line 120 of file SNAna_module.cc.

std::string SNAna::fOpHitModuleLabel
private

Definition at line 113 of file SNAna_module.cc.

std::string SNAna::fPlonLabel
private

Definition at line 122 of file SNAna_module.cc.

std::string SNAna::fRawDigitLabel
private

Definition at line 110 of file SNAna_module.cc.

std::string SNAna::fRdonLabel
private

Definition at line 123 of file SNAna_module.cc.

bool SNAna::fSaveIDEs
private

Definition at line 133 of file SNAna_module.cc.

bool SNAna::fSaveNeighbourADCs
private

Definition at line 132 of file SNAna_module.cc.

bool SNAna::fSavePDS
private

Definition at line 136 of file SNAna_module.cc.

bool SNAna::fSaveTPC
private

Definition at line 135 of file SNAna_module.cc.

bool SNAna::fSaveTruth
private

Definition at line 134 of file SNAna_module.cc.

TTree* SNAna::fSNAnaTree
private

Definition at line 138 of file SNAna_module.cc.

art::ServiceHandle<geo::Geometry> SNAna::geo
private

Definition at line 270 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM1Chan
private

Definition at line 183 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM1SADC
private

Definition at line 177 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM2Chan
private

Definition at line 182 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM2SADC
private

Definition at line 176 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM5Chan
private

Definition at line 181 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjM5SADC
private

Definition at line 175 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP1Chan
private

Definition at line 184 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP1SADC
private

Definition at line 178 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP2Chan
private

Definition at line 185 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP2SADC
private

Definition at line 179 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP5Chan
private

Definition at line 186 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_AdjP5SADC
private

Definition at line 180 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_Chan
private

Definition at line 152 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_Int
private

Definition at line 162 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_Peak
private

Definition at line 163 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_RMS
private

Definition at line 160 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_SADC
private

Definition at line 161 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_Size
private

Definition at line 150 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_Time
private

Definition at line 159 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_TPC
private

Definition at line 151 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_Energy
private

Definition at line 172 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_EvEnergy
private

Definition at line 167 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_True_GenType
private

Definition at line 164 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_True_MainTrID
private

Definition at line 165 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_True_MarleyIndex
private

Definition at line 168 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_nElec
private

Definition at line 173 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_True_nIDEs
private

Definition at line 174 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_True_TrackID
private

Definition at line 166 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_X
private

Definition at line 169 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_Y
private

Definition at line 170 of file SNAna_module.cc.

std::vector<float> SNAna::Hit_True_Z
private

Definition at line 171 of file SNAna_module.cc.

std::vector<int> SNAna::Hit_View
private

Definition at line 149 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_X_end
private

Definition at line 156 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_X_start
private

Definition at line 153 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_Y_end
private

Definition at line 157 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_Y_start
private

Definition at line 154 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_Z_end
private

Definition at line 158 of file SNAna_module.cc.

std::vector<double> SNAna::Hit_Z_start
private

Definition at line 155 of file SNAna_module.cc.

std::vector<int> SNAna::IDEChannel
private

Definition at line 252 of file SNAna_module.cc.

std::vector<float> SNAna::IDEElectrons
private

Definition at line 256 of file SNAna_module.cc.

std::vector<int> SNAna::IDEEndTime
private

Definition at line 254 of file SNAna_module.cc.

std::vector<float> SNAna::IDEEnergy
private

Definition at line 255 of file SNAna_module.cc.

std::vector<int> SNAna::IDEParticle
private

Definition at line 257 of file SNAna_module.cc.

std::vector<int> SNAna::IDEStartTime
private

Definition at line 253 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::KrypParts
private

Definition at line 121 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::MarlParts
private

Definition at line 116 of file SNAna_module.cc.

int SNAna::NColHit
private

Definition at line 145 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::NeutParts
private

Definition at line 120 of file SNAna_module.cc.

int SNAna::NHitNoBT
private

Definition at line 147 of file SNAna_module.cc.

int SNAna::NIndHit
private

Definition at line 146 of file SNAna_module.cc.

int SNAna::NTotHit
private

Definition at line 144 of file SNAna_module.cc.

int SNAna::NTotIDEs
private

Definition at line 251 of file SNAna_module.cc.

Definition at line 273 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_Amplitude
private

Definition at line 197 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_Area
private

Definition at line 196 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_FastToTotal
private

Definition at line 199 of file SNAna_module.cc.

std::vector<unsigned short> SNAna::PDS_OpHit_Frame
private

Definition at line 194 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_OpChannel
private

Definition at line 188 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_PE
private

Definition at line 198 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_PeakTime
private

Definition at line 193 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_PeakTimeAbs
private

Definition at line 192 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_True_Energy
private

Definition at line 202 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_True_EnergyAll
private

Definition at line 205 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_GenType
private

Definition at line 200 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_GenTypeAll
private

Definition at line 204 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_Index
private

Definition at line 201 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_IndexAll
private

Definition at line 207 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_TrackID
private

Definition at line 203 of file SNAna_module.cc.

std::vector<int> SNAna::PDS_OpHit_True_TrackIDAll
private

Definition at line 206 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_Width
private

Definition at line 195 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_X
private

Definition at line 189 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_Y
private

Definition at line 190 of file SNAna_module.cc.

std::vector<double> SNAna::PDS_OpHit_Z
private

Definition at line 191 of file SNAna_module.cc.

Definition at line 272 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::PlonParts
private

Definition at line 122 of file SNAna_module.cc.

std::map< int, simb::MCParticle > SNAna::RdonParts
private

Definition at line 123 of file SNAna_module.cc.

int SNAna::Run
private

Definition at line 140 of file SNAna_module.cc.

int SNAna::secondCatch
private

Definition at line 107 of file SNAna_module.cc.

int SNAna::SubRun
private

Definition at line 141 of file SNAna_module.cc.

int SNAna::thirdCatch
private

Definition at line 108 of file SNAna_module.cc.

int SNAna::TotGen_APA
private

Definition at line 260 of file SNAna_module.cc.

int SNAna::TotGen_Ar39
private

Definition at line 262 of file SNAna_module.cc.

int SNAna::TotGen_Ar42
private

Definition at line 267 of file SNAna_module.cc.

int SNAna::TotGen_CPA
private

Definition at line 261 of file SNAna_module.cc.

int SNAna::TotGen_Kryp
private

Definition at line 264 of file SNAna_module.cc.

int SNAna::TotGen_Marl
private

Definition at line 259 of file SNAna_module.cc.

int SNAna::TotGen_Neut
private

Definition at line 263 of file SNAna_module.cc.

int SNAna::TotGen_Plon
private

Definition at line 265 of file SNAna_module.cc.

int SNAna::TotGen_Rdon
private

Definition at line 266 of file SNAna_module.cc.

std::map<int, int> SNAna::trkIDToMarleyIndex
private

Definition at line 127 of file SNAna_module.cc.

std::map<int, PType> SNAna::trkIDToPType
private

Definition at line 130 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_EndE
private

Definition at line 249 of file SNAna_module.cc.

std::vector<std::string> SNAna::True_Bck_EndProcess
private

Definition at line 237 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_EndT
private

Definition at line 248 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_EndX
private

Definition at line 245 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_EndY
private

Definition at line 246 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_EndZ
private

Definition at line 247 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_Energy
private

Definition at line 244 of file SNAna_module.cc.

std::vector<int> SNAna::True_Bck_ID
private

Definition at line 235 of file SNAna_module.cc.

std::vector<int> SNAna::True_Bck_Mode
private

Definition at line 233 of file SNAna_module.cc.

std::vector<int> SNAna::True_Bck_Mother
private

Definition at line 238 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_P
private

Definition at line 239 of file SNAna_module.cc.

std::vector<int> SNAna::True_Bck_PDG
private

Definition at line 234 of file SNAna_module.cc.

std::vector<std::string> SNAna::True_Bck_Process
private

Definition at line 236 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_Time
private

Definition at line 243 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_VertX
private

Definition at line 240 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_VertY
private

Definition at line 241 of file SNAna_module.cc.

std::vector<double> SNAna::True_Bck_VertZ
private

Definition at line 242 of file SNAna_module.cc.

std::vector<int> SNAna::True_CCNC
private

Definition at line 213 of file SNAna_module.cc.

std::vector<float> SNAna::True_Dirx
private

Definition at line 228 of file SNAna_module.cc.

std::vector<float> SNAna::True_Diry
private

Definition at line 229 of file SNAna_module.cc.

std::vector<float> SNAna::True_Dirz
private

Definition at line 230 of file SNAna_module.cc.

std::vector<float> SNAna::True_ENu
private

Definition at line 219 of file SNAna_module.cc.

std::vector<float> SNAna::True_ENu_Lep
private

Definition at line 220 of file SNAna_module.cc.

std::vector<int> SNAna::True_HitNucleon
private

Definition at line 214 of file SNAna_module.cc.

std::vector<int> SNAna::True_MarlSample
private

Definition at line 216 of file SNAna_module.cc.

std::vector<float> SNAna::True_MarlTime
private

Definition at line 217 of file SNAna_module.cc.

std::vector<float> SNAna::True_MarlWeight
private

Definition at line 218 of file SNAna_module.cc.

std::vector<int> SNAna::True_Mode
private

Definition at line 212 of file SNAna_module.cc.

std::vector<int> SNAna::True_Nu_Lep_Type
private

Definition at line 211 of file SNAna_module.cc.

std::vector<int> SNAna::True_Nu_Type
private

Definition at line 210 of file SNAna_module.cc.

std::vector<float> SNAna::True_Px
private

Definition at line 225 of file SNAna_module.cc.

std::vector<float> SNAna::True_Py
private

Definition at line 226 of file SNAna_module.cc.

std::vector<float> SNAna::True_Pz
private

Definition at line 227 of file SNAna_module.cc.

std::vector<int> SNAna::True_Target
private

Definition at line 215 of file SNAna_module.cc.

std::vector<float> SNAna::True_Time
private

Definition at line 231 of file SNAna_module.cc.

std::vector<int> SNAna::True_VertexChan
private

Definition at line 209 of file SNAna_module.cc.

std::vector<float> SNAna::True_VertexT
private

Definition at line 224 of file SNAna_module.cc.

std::vector<float> SNAna::True_VertX
private

Definition at line 221 of file SNAna_module.cc.

std::vector<float> SNAna::True_VertY
private

Definition at line 222 of file SNAna_module.cc.

std::vector<float> SNAna::True_VertZ
private

Definition at line 223 of file SNAna_module.cc.

std::map<int, const simb::MCParticle*> SNAna::truthmap
private

Definition at line 125 of file SNAna_module.cc.


The documentation for this class was generated from the following file: