51 _ah = std::make_shared<AnaHelpers>();
56 std::cout<<
"Setting up cluster selector and trkeff histos"<<std::endl;
60 std::cout<<
"Setting up cluster selection"<<std::endl;
63 std::cout<<
"Setting cal time offset in histograms to "<<
timeOffset_<<std::endl;
72 std::cout<<
"Setting up region:: " << regname <<std::endl;
87 std::cout<<
"Setting up region:: " << regname <<std::endl;
91 std::cout<<
"Configuring histos with:: " <<
thrProngCfg_ <<std::endl;
120 std::vector<Particle*> goodEleSide;
121 std::vector<Particle*> goodPosSide;
122 std::vector<Particle*> goodAll;
127 int n_pass_clus_time=0;
128 int n_clusters_event=0;
129 for(
int i_part=0;i_part<
fspart_->size();i_part++){
151 goodAll.push_back(part);
154 goodPosSide.push_back(part);
156 goodEleSide.push_back(part);
191 _trkeff_histos->Fill1DHisto(
"nClusters_pass_trig_time_h",n_pass_clus_time);
194 std::vector<TridentCand> triPairs;
195 for (
int i_part=0; i_part<goodEleSide.size();i_part++){
196 Particle* partEle=goodEleSide.at(i_part);
199 for (
int j_part=0; j_part<goodPosSide.size();j_part++){
200 Particle* partPos=goodPosSide.at(j_part);
204 double cluEleTime=cluEle.
getTime();
205 double cluPosTime=cluPos.
getTime();
209 if(cluEleY*cluPosY>0) {
214 if (!
cluSelector->passCutLt(
"cluTimeDiff_lt",abs(cluEleTime-cluPosTime),weight)){
220 triPairs.push_back(epemPair);
224 _trkeff_histos->Fill1DHisto(
"nClusterPairs_pass_bunch_time_h",triPairs.size());
231 std::vector<ThreeProngCand> threeProngers;
233 for (
int i_pair=0; i_pair<triPairs.size();i_pair++){
239 double cluEleTime=cluEle.
getTime();
240 double cluPosTime=cluPos.
getTime();
248 for (
int k_all=0; k_all<goodAll.size(); k_all++){
249 Particle* partRec=goodAll.at(k_all);
251 double cluRecTime=cluRec.
getTime();
254 if(partRec == partEle || partRec==partPos){
259 if (!
cluSelector->passCutLt(
"cluTimeDiff_lt",abs(cluEleTime-cluRecTime),weight))
261 if (!
cluSelector->passCutLt(
"cluTimeDiff_lt",abs(cluPosTime-cluRecTime),weight))
266 bool foundExistingPronger=
false;
267 for(
int j_3p=0;j_3p<threeProngers.size();j_3p++){
272 bool eleMatches=
false;
273 bool recMatches=
false;
274 bool posMatches=
false;
275 if(checkEle==partEle ||checkEle==partRec)
277 if(checkPos==partPos ||checkPos==partRec)
279 if(checkRec==partRec ||checkEle==partRec ||checkPos==partRec)
281 if(eleMatches && posMatches && recMatches)
282 foundExistingPronger=
true;
285 if(!foundExistingPronger){
287 if(cluRecEne>cluEleEne)
288 this3Pronger={partRec,partPos,partEle};
289 threeProngers.push_back(this3Pronger);
293 if(threeProngers.size()>0)
294 std::cout<<
"Number of 3-prongers found = "<<threeProngers.size()<<std::endl;
298 for (
int i_pair=0; i_pair<triPairs.size();i_pair++){
306 bool isFiducialElectron=
_ah->IsECalFiducial(&electron);
307 bool isFiducialPositron=
_ah->IsECalFiducial(&positron);
335 for (
int i_pair=0; i_pair<threeProngers.size();i_pair++){
339 std::cout<<
"analyzing a three pronger"<<std::endl;
346 bool isFiducialElectron=
_ah->IsECalFiducial(&electron);
347 bool isFiducialPositron=
_ah->IsECalFiducial(&positron);
348 bool isFiducialRecoil=
_ah->IsECalFiducial(&recoil);
350 std::cout<<
"three pronger eSum = "<<clusterESum<<std::endl;
369 std::cout<<
"Filling histos for three pronger"<<std::endl;
CalCluster getCluster() const