1 #ifndef DAQQUICKCLUSTERING_H 2 #define DAQQUICKCLUSTERING_H 11 #include "TStopwatch.h" 32 #include "art_root_io/TFileDirectory.h" 33 #include "art_root_io/TFileService.h" 36 #include "canvas/Persistency/Common/FindMany.h" 37 #include "canvas/Persistency/Common/FindManyP.h" 49 recoHit(
int cEvent,
int cHitView,
int cGenType,
int cHitChan,
50 float cHitTime,
float cHitSADC,
float cHitRMS):
fEvent (cEvent ),
99 cluster(
int cEvent, std::vector<recoHit> cHitVector);
118 std::vector<recoHit>
getHits()
const {
return fHitVector; };
128 std::cout <<
"*********************" <<
std::endl;
130 std::cout <<
"StartChan " << fStartChan <<
std::endl;
131 std::cout <<
"EndChan " << fEndChan <<
std::endl;
132 std::cout <<
"NChan " << fNChan <<
std::endl;
133 std::cout <<
"ChanWidth " << fChanWidth <<
std::endl;
134 std::cout <<
"NHits " << fNHits <<
std::endl;
135 std::cout <<
"Type " << fType <<
std::endl;
136 std::cout <<
"TriggerFlag " << fTriggerFlag <<
std::endl;
138 std::cout <<
"FirstHitTime " << fFirstHitTime <<
std::endl;
139 std::cout <<
"LastHitTime " << fLastHitTime <<
std::endl;
140 std::cout <<
"TimeWidth " << fTimeWidth <<
std::endl;
141 std::cout <<
"MC_EnergyNu " << fMC_EnergyNu <<
std::endl;
142 std::cout <<
"MC_EnergyLep " << fMC_EnergyLep <<
std::endl;
143 std::cout <<
"MC_MarlTime " << fMC_MarlTime <<
std::endl;
144 for(
int i = 0; i < fNHits; i++)
145 fHitVector.at(i).Print();
146 std::cout <<
"*********************" <<
std::endl;
159 int fTriggerFlag = 0;
161 float fFirstHitTime = 0;
162 float fLastHitTime = 0;
163 float fTimeWidth = 0;
164 double fMC_EnergyNu = 0;
165 double fMC_EnergyLep = 0;
166 double fMC_MarlTime = 0;
174 fTimeWindow(TimeWindow),
178 void DoIt(std::vector<recoHit> cHitVector);
187 double fTimeWindow = 0;
210 void endJob()
override;
214 void ResetVariables();
216 void trigger(std::vector<cluster> &vec_Clusters,
unsigned int const &
config);
217 void clusterCut(std::vector<cluster> &vec_Clusters,
unsigned int const &config);
218 void clusterChannels(std::vector<recoHit> &vec_Hits, std::vector<ClusterHitsInTime> &vec_ChannelCluster,
unsigned int const &config);
219 void makeConfigGraph();
220 void FillMyMaps(std::map<int,simb::MCParticle> &MyMap, art::FindManyP<simb::MCParticle> Assn,
222 PType WhichParType(
int TrID );
223 bool InMyMap(
int TrID, std::map< int, simb::MCParticle> ParMap );
def analyze(root, level, gtrees, gbranches, doprint)
std::vector< int > MarlSample
void setTriggerFlag(int cTriggerFlag)
std::vector< int > cut_HitsInWindow
std::map< int, simb::MCParticle > NeutParts
std::vector< int > cut_MinChannels
std::map< int, PType > trkIDToPType
void cluster(In first, In last, Out result, Pred *pred)
float getLastTimeHit() const
void setMC_EnergyNu(double cMC_EnergyNu)
void setMC_MarlTime(double cMC_Marltime)
std::vector< int > cut_MinChanWidth
float getTimeWidth() const
void setHitSADC(float cHitSADC)
art::ServiceHandle< cheat::ParticleInventoryService > pi_serv
std::vector< double > MarlTime
double GetTimeWindow() const
void SetTimeWindow(double inTimeWindow=1)
std::vector< double > out_HitTime
Cluster finding and building.
int getTriggerFlag() const
std::map< int, std::vector< double > > map_EventToMC
std::vector< double > MarlWeight
art framework interface to geometry description
double getMC_EnergyLep() const
std::vector< recoHit > getHits() const
friend bool operator<(recoHit lhs, recoHit rhs)
std::vector< double > out_HitRMS
std::vector< int > cut_AdjChanTolerance
virtual void reconfigure(fhicl::ParameterSet const &pset)
std::vector< float > cut_TimeWindowSize
std::map< int, simb::MCParticle > MarlParts
double getMC_MarlTime() const
std::string fRawDigitLabel
TTree * t_Output_clusteredhits
TTree * t_Output_unusedhits
Declaration of signal hit object.
std::vector< float > cut_TotalADC
void printCluster() const
std::vector< int > out_HitView
void setMC_EnergyLep(double cMC_EnergyLep)
Stores extra MC truth information that is recorded when generating events using a time-dependent supe...
ClusterHitsInTime(double TimeWindow)
std::vector< cluster > fVecClusters
std::vector< recoHit > fHitVector
std::map< int, simb::MCParticle > PlonParts
art::ServiceHandle< cheat::BackTrackerService > bt_serv
Tools and modules for checking out the basics of the Monte Carlo.
std::map< int, simb::MCParticle > RdonParts
double getMC_EnergyNu() const
std::vector< double > out_HitSADC
std::vector< cluster > getClusterVector() const
float getFirstTimeHit() const
art::ServiceHandle< geo::Geometry > geo
std::vector< int > out_GenType
QTextStream & endl(QTextStream &s)
std::map< int, simb::MCParticle > KrypParts
std::vector< int > out_HitChan
recoHit(int cEvent, int cHitView, int cGenType, int cHitChan, float cHitTime, float cHitSADC, float cHitRMS)
std::vector< recoHit > fHitVector