32 |
|
,isoTracks_(-1.) |
33 |
|
,isoNTracks_(-1) |
34 |
|
,scIndex_() |
35 |
+ |
,scRef_() |
36 |
|
,convNTracks_(0) |
37 |
|
,convEoverP_(-1.) |
38 |
|
,convMass_(-1.) |
43 |
|
,convEcalImpactPosition2_() |
44 |
|
,convIndexTrack1_(-1) |
45 |
|
,convIndexTrack2_(-1) |
46 |
+ |
,convTrack1_() |
47 |
+ |
,convTrack2_() |
48 |
|
{;} |
49 |
|
|
50 |
|
TRootPhoton(const TRootPhoton& photon) : |
63 |
|
,isoTracks_(photon.isoTracks_) |
64 |
|
,isoNTracks_(photon.isoNTracks_) |
65 |
|
,scIndex_(photon.scIndex_) |
66 |
+ |
,scRef_(photon.scRef_) |
67 |
|
,convNTracks_(photon.convNTracks_) |
68 |
|
,convEoverP_(photon.convEoverP_) |
69 |
|
,convMass_(photon.convMass_) |
74 |
|
,convEcalImpactPosition2_(photon.convEcalImpactPosition2_) |
75 |
|
,convIndexTrack1_(photon.convIndexTrack1_) |
76 |
|
,convIndexTrack2_(photon.convIndexTrack2_) |
77 |
+ |
,convTrack1_(photon.convTrack1_) |
78 |
+ |
,convTrack2_(photon.convTrack2_) |
79 |
|
{;} |
80 |
|
|
81 |
|
TRootPhoton(Double_t px, Double_t py, Double_t pz, Double_t e) : |
94 |
|
,isoTracks_(-1.) |
95 |
|
,isoNTracks_(-1) |
96 |
|
,scIndex_() |
97 |
+ |
,scRef_() |
98 |
|
,convNTracks_(0) |
99 |
|
,convEoverP_(-1.) |
100 |
|
,convMass_(-1.) |
105 |
|
,convEcalImpactPosition2_() |
106 |
|
,convIndexTrack1_(-1) |
107 |
|
,convIndexTrack2_(-1) |
108 |
+ |
,convTrack1_() |
109 |
+ |
,convTrack2_() |
110 |
|
{;} |
111 |
|
|
112 |
|
TRootPhoton(Double_t px, Double_t py, Double_t pz, Double_t e, Double_t vtx_x, Double_t vtx_y, Double_t vtx_z) : |
125 |
|
,isoTracks_(-1.) |
126 |
|
,isoNTracks_(-1) |
127 |
|
,scIndex_() |
128 |
+ |
,scRef_() |
129 |
|
,convNTracks_(0) |
130 |
|
,convEoverP_(-1.) |
131 |
|
,convMass_(-1.) |
154 |
|
,isoTracks_(-1.) |
155 |
|
,isoNTracks_(-1) |
156 |
|
,scIndex_() |
157 |
+ |
,scRef_() |
158 |
|
,convNTracks_(0) |
159 |
|
,convEoverP_(-1.) |
160 |
|
,convMass_(-1.) |
165 |
|
,convEcalImpactPosition2_() |
166 |
|
,convIndexTrack1_(-1) |
167 |
|
,convIndexTrack2_(-1) |
168 |
+ |
,convTrack1_() |
169 |
+ |
,convTrack2_() |
170 |
|
{;} |
171 |
|
|
172 |
|
TRootPhoton(const TLorentzVector &momentum) : |
185 |
|
,isoTracks_(-1.) |
186 |
|
,isoNTracks_(-1) |
187 |
|
,scIndex_() |
188 |
+ |
,scRef_() |
189 |
|
,convNTracks_(0) |
190 |
|
,convEoverP_(-1.) |
191 |
|
,convMass_(-1.) |
196 |
|
,convEcalImpactPosition2_() |
197 |
|
,convIndexTrack1_(-1) |
198 |
|
,convIndexTrack2_(-1) |
199 |
+ |
,convTrack1_() |
200 |
+ |
,convTrack2_() |
201 |
|
{;} |
202 |
|
|
203 |
|
TRootPhoton(const TLorentzVector &momentum, const TVector3 &vertex, Int_t type, Float_t charge) : |
216 |
|
,isoTracks_(-1.) |
217 |
|
,isoNTracks_(-1) |
218 |
|
,scIndex_() |
219 |
+ |
,scRef_() |
220 |
|
,convNTracks_(0) |
221 |
|
,convEoverP_(-1.) |
222 |
|
,convMass_(-1.) |
227 |
|
,convEcalImpactPosition2_() |
228 |
|
,convIndexTrack1_(-1) |
229 |
|
,convIndexTrack2_(-1) |
230 |
+ |
,convTrack1_() |
231 |
+ |
,convTrack2_() |
232 |
|
{;} |
233 |
|
|
234 |
|
~TRootPhoton() {;} |
256 |
|
} |
257 |
|
map<Int_t,Int_t> scIndexMap() const { return scIndex_;} |
258 |
|
|
259 |
+ |
// return first SC seed |
260 |
+ |
TObject* superCluster() |
261 |
+ |
{ |
262 |
+ |
map<Int_t,TRef>::iterator it=scRef_.begin(); |
263 |
+ |
return ( scRef_.size()==0 ? 0 : (*it).second.GetObject() ); |
264 |
+ |
} |
265 |
+ |
|
266 |
+ |
// SC seed of type "type" |
267 |
+ |
TObject* superCluster(Int_t type) |
268 |
+ |
{ |
269 |
+ |
map<Int_t,TRef>::iterator it=scRef_.find(type); |
270 |
+ |
return ( it ==scRef_.end() ? 0 : (*it).second.GetObject() ); |
271 |
+ |
} |
272 |
+ |
map<Int_t,TRef> scRefMap() const { return scRef_;} |
273 |
+ |
|
274 |
|
// Converted photon infos |
275 |
|
Int_t convNTracks() const { return convNTracks_;} |
276 |
|
Float_t convEoverP() const { return convEoverP_;} |
280 |
|
TVector3 convVertex() const { return convVertex_;} |
281 |
|
TVector3 convEcalImpactPosition1() const { return convEcalImpactPosition1_;} |
282 |
|
TVector3 convEcalImpactPosition2() const { return convEcalImpactPosition2_;} |
283 |
+ |
TObject* convTrack1() const { return convTrack1_.GetObject();} |
284 |
+ |
TObject* convTrack2() const { return convTrack2_.GetObject();} |
285 |
+ |
// FIXME - remove convIndexTrack1,2() (kept for backward compatibility) |
286 |
|
Int_t convIndexTrack1() const { return convIndexTrack1_;} |
287 |
|
Int_t convIndexTrack2() const { return convIndexTrack2_;} |
288 |
|
|
321 |
|
void setIsoTracks(Float_t isoTracks) { isoTracks_ = isoTracks; } |
322 |
|
void setIsoNTracks(Int_t isoNTracks) { isoNTracks_ = isoNTracks; } |
323 |
|
void setSCIndex(Int_t type, Int_t index) { scIndex_[type]=index; } |
324 |
+ |
void setSCRef(Int_t type, TObject* superCluster) { scRef_[type]=superCluster; } |
325 |
|
|
326 |
|
void setIsolation(Float_t isoEcalIsland, Float_t isoEcalDoubleCone, Float_t isoHcal, Float_t isoTracks, Int_t isoNTracks) |
327 |
|
{ |
354 |
|
void setConvEcalImpactPosition1(Double_t x, Double_t y, Double_t z) { convEcalImpactPosition1_.SetXYZ(x, y ,z); } |
355 |
|
void setConvEcalImpactPosition2(TVector3 convEcalImpactPosition2) { convEcalImpactPosition2_=convEcalImpactPosition2; } |
356 |
|
void setConvEcalImpactPosition2(Double_t x, Double_t y, Double_t z) { convEcalImpactPosition2_.SetXYZ(x, y ,z); } |
357 |
+ |
void setConvTrack1(TObject* convTrack1) { convTrack1_=convTrack1; } |
358 |
+ |
void setConvTrack2(TObject* convTrack2) { convTrack2_=convTrack2; } |
359 |
+ |
// FIXME - remove convIndexTrack1,2() (kept for backward compatibility) |
360 |
|
void setConvIndexTrack1(Int_t convIndexTrack1) { convIndexTrack1_=convIndexTrack1; } |
361 |
|
void setConvIndexTrack2(Int_t convIndexTrack2) { convIndexTrack2_=convIndexTrack2; } |
362 |
|
|
394 |
|
return stream; |
395 |
|
}; |
396 |
|
|
397 |
+ |
void Print() |
398 |
+ |
{ |
399 |
+ |
cout << "TRootPhoton (E,Et,eta,phi)=("<< this->Mag() <<","<< this->Et() <<","<< this->Eta() <<","<< this->Phi() << ")" |
400 |
+ |
<< " hasPxlSeed=" << this-> hasPixelSeed() <<" E5x5=" << this->e5x5() <<" R19=" << this->r19() |
401 |
+ |
<<" R9=" << this->r9() <<" hoe=" << this->hoe() <<" Pi0=" << this->pi0nn() |
402 |
+ |
<< " vertex=("<< this->vx() <<","<< this->vy() <<","<< this->vz() << ")" |
403 |
+ |
<< " caloPosition=(" << this->caloPosition().X() << "," << this->caloPosition().Y() << "," << this->caloPosition().Z() << ")" |
404 |
+ |
<< " iso(ecal1,ecal2,hcal,track,ntracks)=("<< this->isoEcalIsland() << "," << this->isoEcalDoubleCone() << "," << this->isoHcal() << "," << this->isoTracks() << "," << this->isoNTracks() << ")"; |
405 |
+ |
}; |
406 |
|
|
407 |
|
private: |
408 |
|
|
421 |
|
Int_t isoNTracks_; // Tracks multiplicity in a cone around the photon |
422 |
|
|
423 |
|
map<Int_t,Int_t> scIndex_; // indexes of the seed SuperClusters (one per SC tytpe) |
424 |
+ |
map<Int_t,TRef> scRef_; // references to the seed SuperClusters (one per SC tytpe) |
425 |
|
|
426 |
|
// Conversion Infos |
427 |
|
Int_t convNTracks_; // Number of reconstructed tracks associated to the converted photon candidate |
432 |
|
TVector3 convVertex_; // Position of the conversion vertex |
433 |
|
TVector3 convEcalImpactPosition1_; // Impact position at Ecal front face of the first conversion track |
434 |
|
TVector3 convEcalImpactPosition2_; // Impact position at Ecal front face of the second conversion track |
435 |
+ |
// FIXME - remove convIndexTrack1,2() (kept for backward compatibility) |
436 |
|
Int_t convIndexTrack1_; // Index of first conversion track (in tracks TCloneArray) |
437 |
|
Int_t convIndexTrack2_; // Index of second conversion track (in tracks TCloneArray) |
438 |
+ |
TRef convTrack1_; |
439 |
+ |
TRef convTrack2_; |
440 |
|
|
441 |
|
// Photon ID: |
442 |
|
// LooseEM: ECalRecHit isolation < 20 GeV AND HCalRecHit isolation < 10 GeV |
460 |
|
Bool_t isAlsoElectron_; |
461 |
|
|
462 |
|
|
463 |
< |
ClassDef (TRootPhoton,5); |
463 |
> |
ClassDef (TRootPhoton,6); |
464 |
|
}; |
465 |
|
|
466 |
|
#endif |