FairRoot/PandaRoot
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
PndEmcBump Class Reference

represents a reconstructed (splitted) emc cluster More...

#include <PndEmcBump.h>

Inheritance diagram for PndEmcBump:
PndEmcCluster

Public Member Functions

 PndEmcBump ()
 
virtual ~PndEmcBump ()
 
virtual void MadeFrom (Int_t clusterIndex)
 
virtual void Print (Int_t iBump) const
 
Int_t GetClusterIndex ()
 
Int_t GetEventNo () const
 
void SetEventNo (Int_t evtNo)
 
virtual void Print (const Option_t *opt="") const
 
const std::vector< Int_t > & DigiList () const
 
std::vector< Int_t > & DigiList ()
 
const std::map< Int_t, Int_t > & LocalMaxMap () const
 
const std::map< Int_t, Int_t > & MemberDigiMap () const
 
virtual const PndEmcDigiMaxima (const TClonesArray *digiArray) const
 
virtual PndEmcDigiMaxima (const TClonesArray *digiArray)
 
virtual Double_t energy () const
 
Double_t theta () const
 
Double_t phi () const
 
TVector3 position () const
 
TVector3 where () const
 
Double_t x () const
 
Double_t y () const
 
Double_t z () const
 
Double_t Z20 () const
 
Double_t Z53 () const
 
Double_t LatMom () const
 
Short_t GetModule () const
 
bool IsEnergyValid () const
 
bool IsPositionValid () const
 
Int_t NumberOfDigis () const
 
Int_t NBumps () const
 
bool isInCluster (PndEmcDigi *theDigi, const TClonesArray *digiArray)
 
virtual Double_t DistanceToCentre (const TVector3 &aPoint) const
 
virtual Double_t DistanceToCentre (const PndEmcDigi *aDigi) const
 
virtual void addDigi (const TClonesArray *digiArray, Int_t iDigi)
 
virtual void removeDigi (const TClonesArray *digiArray, Int_t iDigi)
 
virtual std::vector< Int_t >
::iterator 
removeDigi (const TClonesArray *digiArray, std::vector< Int_t >::iterator it)
 
void addCluster (PndEmcCluster *cluster, const TClonesArray *digiArray)
 
virtual void addLocalMax (const TClonesArray *digiArray, Int_t iDigi)
 
virtual void addLocalMax (const PndEmcDigi *digi)
 
virtual void SetNBumps (unsigned nbumps)
 
void SetEnergy (Double_t en)
 
void SetPosition (TVector3 pos)
 
void SetZ20 (Double_t z20)
 
void SetZ53 (Double_t z53)
 
void SetLatMom (Double_t latMom)
 
void SetTrackEntering (const FairMultiLinkedData &tracks)
 
void SetTrackExiting (const FairMultiLinkedData &tracks)
 
void AddTracksEnteringExiting (const FairMultiLinkedData &tracksEntering, const FairMultiLinkedData &tracksExiting)
 Updates the links to entering and exiting tracks. More...
 
Double_t GetEnergyCorrected () const
 
const std::vector< Int_t > & GetMcList () const
 
Int_t GetMcSize ()
 
Int_t GetMcIndex (Int_t i=0)
 
FairMultiLinkedData GetTrackEntering () const
 
FairMultiLinkedData GetTrackExiting () const
 

Static Public Member Functions

static Double_t FindPhiDiff (Double_t, Double_t)
 

Protected Member Functions

void FillScoreBoard (FairMultiLinkedData tracks, std::map< FairLink, LinkScoreBoard > &scoreBoard, Int_t shift)
 

Protected Attributes

Int_t fClusterIndex
 
Int_t fEvtNo
 
std::vector< Int_t > fDigiList
 
std::vector< Int_t > fMcList
 
std::map< Int_t, Int_t > fMcMap
 
std::map< Int_t, Int_t > fMemberDigiMap
 
std::map< Int_t, Int_t > fLocalMaxMap
 
bool fEnergyValid
 
Double_t fEnergy
 
bool fWhereValid
 
TVector3 fWhere
 
unsigned fNbumps
 
Double_t fZ20
 
Double_t fZ53
 
Double_t fLatMom
 
FairMultiLinkedData fTrackEntering
 
FairMultiLinkedData fTrackExiting
 

Private Member Functions

PndEmcBumpoperator= (const PndEmcBump &rv)
 

Detailed Description

represents a reconstructed (splitted) emc cluster

Definition at line 34 of file PndEmcBump.h.

Constructor & Destructor Documentation

PndEmcBump::PndEmcBump ( )

Definition at line 50 of file PndEmcBump.cxx.

References PndEmcCluster::SetNBumps().

51  : fClusterIndex( 0 )
52 {
53  SetNBumps(1);
54 }
virtual void SetNBumps(unsigned nbumps)
Int_t fClusterIndex
Definition: PndEmcBump.h:61
PndEmcBump::~PndEmcBump ( )
virtual

Definition at line 62 of file PndEmcBump.cxx.

63 {
64 }

Member Function Documentation

void PndEmcCluster::addCluster ( PndEmcCluster cluster,
const TClonesArray *  digiArray 
)
inherited

Definition at line 206 of file PndEmcCluster.cxx.

References PndEmcCluster::addDigi(), PndEmcCluster::AddTracksEnteringExiting(), PndEmcCluster::DigiList(), PndEmcCluster::GetTrackEntering(), and PndEmcCluster::GetTrackExiting().

Referenced by PndEmcMakeClusterOnline::Exec(), and PndEmcMakeCluster::Exec().

207 {
208  const vector<Int_t> tmpList = cluster->DigiList();
209  vector<Int_t>::const_iterator digi_iter;
210  for (digi_iter=tmpList.begin();digi_iter!=tmpList.end();++digi_iter)
211  {
212  addDigi(digiArray, *digi_iter);
213  }
215  AddLinks(cluster->GetLinks());
216 }
const std::vector< Int_t > & DigiList() const
Definition: PndEmcCluster.h:40
void AddTracksEnteringExiting(const FairMultiLinkedData &tracksEntering, const FairMultiLinkedData &tracksExiting)
Updates the links to entering and exiting tracks.
FairMultiLinkedData GetTrackExiting() const
FairMultiLinkedData GetTrackEntering() const
virtual void addDigi(const TClonesArray *digiArray, Int_t iDigi)
void PndEmcCluster::addDigi ( const TClonesArray *  digiArray,
Int_t  iDigi 
)
virtualinherited

Definition at line 157 of file PndEmcCluster.cxx.

References digi, PndEmcCluster::fDigiList, PndEmcCluster::fMcMap, PndEmcCluster::fMemberDigiMap, PndEmcDigi::GetDetectorId(), PndEmcDigi::GetTrackId(), and PndEmcCluster::invalidateCache().

Referenced by PndEmcCluster::addCluster(), PndEmcMakeClusterOnline::Exec(), PndEmcMakeCluster::Exec(), and PndEmcExpClusterSplitter::Exec().

158 {
159  fDigiList.push_back(iDigi);
160  PndEmcDigi *digi= (PndEmcDigi *) digiArray->At(iDigi);
161  Int_t detectorId =digi->GetDetectorId();
162  fMemberDigiMap.insert(std::pair<Int_t,Int_t>(detectorId, iDigi));
163 
164  fTimeStamp = (digi->GetTimeStamp() > this->GetTimeStamp()) ? digi->GetTimeStamp() : this->GetTimeStamp();
165  //std::cout<<"digi belongs to track #"<<digi->GetTrackId()<<std::endl;
166  ++fMcMap[digi->GetTrackId()];
167  invalidateCache(kFALSE);
168  SetInsertHistory(kFALSE);
169  if(FairRunAna::Instance()->IsTimeStamp()) {
170  AddLink((static_cast<PndEmcDigi*>(digiArray->At(iDigi))->GetEntryNr()));
171  } else {
172  AddLink(FairLink(-1, FairRootManager::Instance()->GetEntryNr(), "EmcDigi", iDigi));
173  }
174  SetInsertHistory(kTRUE);
175 }
TClonesArray * digi
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
std::map< Int_t, Int_t > fMcMap
Int_t GetTrackId() const
Definition: PndEmcDigi.h:96
std::map< Int_t, Int_t > fMemberDigiMap
void invalidateCache(bool)
std::vector< Int_t > fDigiList
void PndEmcCluster::addLocalMax ( const TClonesArray *  digiArray,
Int_t  iDigi 
)
virtualinherited

Definition at line 218 of file PndEmcCluster.cxx.

References digi, PndEmcCluster::fLocalMaxMap, and PndEmcDigi::GetDetectorId().

Referenced by PndEmc2DLocMaxFinder::Exec().

219 {
220  PndEmcDigi *digi= (PndEmcDigi *) digiArray->At(iDigi);
221  Int_t detectorId =digi->GetDetectorId();
222  fLocalMaxMap.insert(std::pair<Int_t,Int_t>(detectorId, iDigi));
223 };
TClonesArray * digi
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
std::map< Int_t, Int_t > fLocalMaxMap
void PndEmcCluster::addLocalMax ( const PndEmcDigi digi)
virtualinherited

Definition at line 225 of file PndEmcCluster.cxx.

References PndEmcCluster::fLocalMaxMap, PndEmcCluster::fMemberDigiMap, and PndEmcDigi::GetDetectorId().

226 {
227  Int_t detectorId =digi->GetDetectorId();
228  Int_t iDigi= fMemberDigiMap.find(detectorId)->second;
229  fLocalMaxMap.insert(std::pair<Int_t,Int_t>(detectorId, iDigi));
230 };
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
std::map< Int_t, Int_t > fMemberDigiMap
std::map< Int_t, Int_t > fLocalMaxMap
void PndEmcCluster::AddTracksEnteringExiting ( const FairMultiLinkedData &  tracksEntering,
const FairMultiLinkedData &  tracksExiting 
)
inherited

Updates the links to entering and exiting tracks.

For each track a bitmask is created which contains the information if the track enters or exits the cluster (bit 1 and 0 for tracks already in the cluster, bit 3 and 2 for the ones added here). Afterwards, the bitmask is checked for each track and the lists of entering and exiting tracks is updated. Tracks which entered before and exit now or vice versa (bitmask=6 or 9) are removed from the list as they only cross between crystals in the same cluster.

Parameters
tracksEnteringAdditional tracks entering the cluster (e.g. from adding digi or merging clusters)
tracksExitingAdditional tracks exiting the cluster
Returns
void

Definition at line 535 of file PndEmcCluster.cxx.

References PndEmcCluster::FillScoreBoard(), PndEmcCluster::fTrackEntering, and PndEmcCluster::fTrackExiting.

Referenced by PndEmcCluster::addCluster(), and PndEmcMakeCluster::Exec().

536 {
537  std::map<FairLink, LinkScoreBoard> scoreBoard;
538  std::set<FairLink> entering, exiting;
539 
540 // std::cout << "tracksEntering " << tracksEntering << std::endl;
541 // std::cout << "tracksExiting " << tracksExiting << std::endl;
542 // std::cout << "existingEntering " << fTrackEntering << std::endl;
543 // std::cout << "existingExiting " << fTrackExiting << std::endl;
544 
545  FillScoreBoard(tracksEntering, scoreBoard, 3);
546  FillScoreBoard(tracksExiting, scoreBoard, 2);
547  FillScoreBoard(fTrackEntering, scoreBoard, 1);
548  FillScoreBoard(fTrackExiting, scoreBoard, 0);
549 
550  for (std::map<FairLink, LinkScoreBoard>::iterator iter = scoreBoard.begin(); iter != scoreBoard.end(); iter++){
551  //std::cout << iter->first << " " << iter->second.score << std::endl;
552  switch (iter->second.score){
553  case 15: entering.insert(iter->first); exiting.insert(iter->first); break;
554  case 14: entering.insert(iter->first); break;
555  case 13: exiting.insert(iter->first); break;
556  case 12: entering.insert(iter->first); exiting.insert(iter->first); break;
557  case 11: entering.insert(iter->first); break;
558  case 10: std::cout << "-E- PndEmcCluster::AddTracksEnteringExiting Same particle entering twice!" << std::endl; break;
559  case 9: break;
560  case 8: entering.insert(iter->first); break;
561  case 7: exiting.insert(iter->first); break;
562  case 6: break;
563  case 5: std::cout << "-E- PndEmcCluster::AddTracksEnteringExiting Same particle exiting twice!" << std::endl; break;
564  case 4: exiting.insert(iter->first); break;
565  case 3: entering.insert(iter->first); exiting.insert(iter->first); break;
566  case 2: entering.insert(iter->first); break;
567  case 1: exiting.insert(iter->first); break;
568  case 0: break;
569  default: std::cout << "-E- PndEmcCluster::AddTracksEnteringExiting wrong score " << iter->second.score << std::endl; break;
570  }
571  }
572  fTrackEntering.SetLinks(entering);
573  fTrackExiting.SetLinks(exiting);
574 
575 // std::cout << "Entering after merge " << fTrackEntering << std::endl;
576 // std::cout << "Exiting after merge " << fTrackExiting << std::endl;
577 }
FairMultiLinkedData fTrackExiting
FairMultiLinkedData fTrackEntering
void FillScoreBoard(FairMultiLinkedData tracks, std::map< FairLink, LinkScoreBoard > &scoreBoard, Int_t shift)
const std::vector<Int_t>& PndEmcCluster::DigiList ( ) const
inlineinherited
std::vector<Int_t>& PndEmcCluster::DigiList ( )
inlineinherited

Definition at line 41 of file PndEmcCluster.h.

References PndEmcCluster::fDigiList.

41 {return fDigiList;};
std::vector< Int_t > fDigiList
Double_t PndEmcCluster::DistanceToCentre ( const TVector3 &  aPoint) const
virtualinherited

Definition at line 367 of file PndEmcCluster.cxx.

References PndEmcCluster::where().

368 {
369  return ( where() - aPoint ).Mag();
370 }
TVector3 where() const
Double_t PndEmcCluster::DistanceToCentre ( const PndEmcDigi aDigi) const
virtualinherited

Definition at line 373 of file PndEmcCluster.cxx.

References PndEmcCluster::where(), and PndEmcDigi::where().

374 {
375  return ( where() - aDigi->where() ).Mag();
376 }
TVector3 where() const
const TVector3 & where() const
Definition: PndEmcDigi.h:111
Double_t PndEmcCluster::energy ( ) const
virtualinherited

Definition at line 79 of file PndEmcCluster.cxx.

References PndEmcCluster::fEnergy, and PndEmcCluster::fEnergyValid.

Referenced by analysis_cluster_energyCorrection_Ntuple(), PndEmcXClMoments::Calc_AbsZernikeMoment(), PndEmcDigiCalibrator::CalibrationEvtTimeByBump(), PndEmcClusterMoments::Centre1(), PndEmcClusterMoments::Centre2(), PndPidCorrelator::ConstructNeutralCandidate(), emc_correction_hist(), emc_correction_parametrization(), emc_correction_QA(), PndEmcClusterHistCalibrator::Energy(), PndEmcClusterSimpleCalibrator::Energy(), error_matrix_fit(), PndKFParticleFinder::Exec(), PndEmcMakeRecoHit::Exec(), PndEmcHdrFiller::Exec(), PndEmcCorrBump::Exec(), PndEmcMakeCorr::Exec(), PndEmcAnalysis::Exec(), PndEmcXClMoments::Fast_AbsZernikeMoment(), fit_resolution(), for(), PndEmcErrorMatrix::Get4MomentumErrorMatrix(), PndPidCorrelator::GetEmcInfo(), PndEmcCluster::GetEnergyCorrected(), GetEntriesFast(), PndEmcErrorMatrix::GetErrorMatrix(), PndEmcErrorMatrix::GetErrorP7(), PndPidCorrelator::GetFscInfo(), PndEmcDigiCalibrator::GetTimeResolutionOfShower(), PndEmcClusterDraw::GetValue(), PndEmcClusterProperties::GravWhere(), if(), PndEmcClusterMoments::Major1(), PndEmcClusterMoments::Major2(), PndEmcClusterMoments::Minor1(), PndEmcClusterMoments::Minor2(), PndEmcClusterMoments::Phi1(), PndEmcClusterMoments::Phi2(), PndEmcClusterDistances::PndEmcClusterDistances(), PndEmcCluster::Print(), Print(), QAmacro_emc_3(), reco_analys(), PndEmcClusterMoments::SecondMoment(), PndEmcXClMoments::SecondMoment(), PndEmcXClMoments::SecondMomentPhi(), PndEmcXClMoments::SecondMomentTheta(), PndEmcClusterMoments::SecondMomentTP(), PndEmcClusterMoments::Theta1(), PndEmcClusterMoments::Theta2(), vis_mc_ids(), and PndEmcClusterHistCalibrator::Where().

80 {
81  if (fEnergyValid)
82  return fEnergy;
83  else
84  {
85  std::cout<<"Energy of cluster is not defined"<<std::endl;
86  abort();
87  }
88 }
Double_t fEnergy
void PndEmcCluster::FillScoreBoard ( FairMultiLinkedData  tracks,
std::map< FairLink, LinkScoreBoard > &  scoreBoard,
Int_t  shift 
)
protectedinherited

Definition at line 580 of file PndEmcCluster.cxx.

Referenced by PndEmcCluster::AddTracksEnteringExiting().

581 {
582  std::set<FairLink> links = tracks.GetLinks();
583  for (std::set<FairLink>::iterator linkIter = links.begin(); linkIter != links.end(); linkIter++){
584  scoreBoard[*linkIter].SetValShift(kTRUE, shift);
585  }
586 }
Double_t PndEmcCluster::FindPhiDiff ( Double_t  phi1,
Double_t  phi2 
)
staticinherited

Definition at line 141 of file PndEmcCluster.cxx.

References Double_t, and Pi.

Referenced by PndEmcClusterMoments::Major1(), PndEmcClusterMoments::Major2(), PndEmcClusterProperties::Major_axis(), PndEmcClusterMoments::Minor1(), PndEmcClusterMoments::Minor2(), PndEmcClusterMoments::Phi1(), and PndEmcClusterMoments::Phi2().

142 {
143  Double_t diff;
144  diff = phi1 - phi2;
145 
146  while( diff> TMath::Pi() ) diff -= 2*TMath::Pi();
147  while( diff< -TMath::Pi() ) diff += 2*TMath::Pi();
148 
149  return diff;
150 }
Double_t
Double_t Pi
Int_t PndEmcBump::GetClusterIndex ( )
inline
Double_t PndEmcCluster::GetEnergyCorrected ( ) const
inherited

Definition at line 379 of file PndEmcCluster.cxx.

References b1, b2, cos(), Double_t, PndEmcCluster::energy(), exp(), log(), p1, p2, Pi, sqrt(), t0, t1, t2, t3, and PndEmcCluster::where().

Referenced by analysis_digi_cluster_7gammaAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_fwendcap(), analysis_digi_cluster_fwendcap(), emc_correction_QA(), PndPidBremCorrector::GetSepPhotonE(), and vis_mc_ids().

380 {
381  Double_t e=this->energy();
382  TVector3 clusterPosition= this->where();
383  Double_t theta_cluster=clusterPosition.Theta();
384 
385  Double_t e1=e;
386  Double_t theta1=theta_cluster;
387 
388  if ( (clusterPosition.Z() < 180.0)&&(theta_cluster<140.*TMath::Pi()/180.))
389  {
390  if (e<0.03) e1 = 0.03;
391  if (e>8.0) e1 = 8.0 ;
392  }
393 
394  if ( (clusterPosition.Z() < 180.0)&&(theta_cluster>140.*TMath::Pi()/180.))
395  {
396  if (e<0.03) e1 = 0.03;
397  if (e>2.0) e1 = 2.0 ;
398  }
399 
400  if (clusterPosition.Z() > 180.0)
401  {
402  if (e<0.01) e1 = 0.01;
403  if (e>16.0) e1 = 16.0 ;
404  }
405 
406  double b0 = 1.45312;
407  double b1 = 2.79086e-02;
408  double b2 = 3.91932e-04;
409  double b3 =-1.23117e-03;
410  double b4 = 2.72270e-01;
411  double b5 =-1.31540;
412  double b6 = 1.44447;
413  double b7 =-4.05724e-01;
414  double b8 =-2.07396;
415  double b9 = 4.80507e-02;
416 
417  double p0=0;
418  double p1=0;
419  double p2=0;
420  double p3=0;
421  double p4=0;
422  double p5=0;
423  double p6=0;
424  double p7=0;
425  double p8=0;
426  double p9=0;
427 
428  if(e1<1.0)
429  {
430  p0 = 4.13189e-02;
431  p1 = -2.03834e-02;
432  p2 = -2.58086e-03;
433  p3 = -1.77821e-03;
434  p4 = -1.73738e-02;
435  p5 = 7.40362e-02;
436  p6 = -6.41892e-02;
437  p7 = -9.85564e-02;
438  p8 = 1.50123e-01;
439  p9 = -7.87742e-04;
440  }
441  else
442  {
443  p0 = 5.05003e-02;
444  p1 = -3.47672e-02;
445  p2 = 3.72767e-02;
446  p3 = -1.26492e-02;
447  p4 = -2.16876e-02;
448  p5 = 1.02682e-01;
449  p6 = -9.85242e-02;
450  p7 = -1.39872e-01;
451  p8 = 2.02309e-01;
452  p9 = 1.11696e-03;
453  }
454 
455 
456  double t0 = 1.81631;
457  double t1 =-1.71202e-02;
458  double t2 = 3.59161e-03;
459  double t3 =-3.46712e-04;
460  double t4 =-3.73691e-01;
461  double t5 =-1.56688;
462  double t6 =-1.62618;
463  double t7 =-4.10972e-01;
464  double t8 = 2.2222;
465  double t9 = 4.60908e-03;
466 
467 
468  double factor1= p0
469  +p1*log(e1)
470  +p2*log(e1)*log(e1)
471  +p3*log(e1)*log(e1)*log(e1)
472  +p4*cos(theta1)
473  +p5*cos(theta1)*cos(theta1)
474  +p6*cos(theta1)*cos(theta1)*cos(theta1)
475  +p7*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
476  +p8*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
477  +p9*log(e1)*cos(theta1);
478 
479  double factor2= t0
480  +t1*log(e1)
481  +t2*log(e1)*log(e1)
482  +t3*log(e1)*log(e1)*log(e1)
483  +t4*cos(theta1)
484  +t5*cos(theta1)*cos(theta1)
485  +t6*cos(theta1)*cos(theta1)*cos(theta1)
486  +t7*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
487  +t8*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
488  +t9*log(e1)*cos(theta1);
489 
490 
491  double factor3= b0
492  +b1*log(e1)
493  +b2*log(e1)*log(e1)
494  +b3*log(e1)*log(e1)*log(e1)
495  +b4*cos(theta1)
496  +b5*cos(theta1)*cos(theta1)
497  +b6*cos(theta1)*cos(theta1)*cos(theta1)
498  +b7*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
499  +b8*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)*cos(theta1)
500  +b9*log(e1)*cos(theta1);
501 
502 
503  double eout1=e* exp(factor1);
504  double eout2=e* exp(factor2);
505  double eout3=e* exp(factor3);
506 
507  double eout4=(3.31694-0.0183379/sqrt(e1)+0.0327113/e1+0.00040156/(e1*e1)-0.00641305/(e1*sqrt(e1)))*e/3.0144;
508 
509 
510 
511  if ( clusterPosition.Z() > 500.0)
512  return eout4;
513  else if ( (clusterPosition.Z() < 180.0)&&(theta_cluster>140.*TMath::Pi()/180.))
514  return eout3;
515  else if ( (clusterPosition.Z() < 180.0)&&(theta_cluster<140.*TMath::Pi()/180.))
516  return eout1;
517  else
518  return eout2;
519 
520 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Int_t t2
Definition: hist-t7.C:106
TVector3 where() const
friend F32vec4 exp(const F32vec4 &a)
Definition: P4_F32vec4.h:109
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
friend F32vec4 log(const F32vec4 &a)
Definition: P4_F32vec4.h:110
Int_t t1
Definition: hist-t7.C:106
Int_t t0
Definition: hist-t7.C:106
Double_t
Int_t t3
Definition: hist-t7.C:106
TPad * p2
Definition: hist-t7.C:117
virtual Double_t energy() const
TPad * p1
Definition: hist-t7.C:116
Double_t Pi
Int_t PndEmcBump::GetEventNo ( ) const
inline

Definition at line 56 of file PndEmcBump.h.

References fEvtNo.

56 { return fEvtNo; }
Int_t fEvtNo
Definition: PndEmcBump.h:62
Int_t PndEmcCluster::GetMcIndex ( Int_t  i = 0)
inlineinherited

Definition at line 116 of file PndEmcCluster.h.

References PndEmcCluster::fMcList, and i.

116 { return fMcList[i]; }
Int_t i
Definition: run_full.C:25
std::vector< Int_t > fMcList
const std::vector< Int_t > & PndEmcCluster::GetMcList ( ) const
inherited

Definition at line 314 of file PndEmcCluster.cxx.

References a, b, PndEmcCluster::fMcList, and i.

Referenced by PndPidCorrelator::ConstructNeutralCandidate(), PndPidCorrelator::GetEmcInfo(), PndPidCorrelator::GetFscInfo(), and vis_mc_ids().

314  {
315  std::vector< map_ele > sortedVec;
316  std::vector<FairLink> mcLinks;
317  FairMultiLinkedData mcFairLinks = GetLinksWithType(FairRootManager::Instance()->GetBranchId("MCTrack"));
318 
319  for (int i = 0; i < mcFairLinks.GetNLinks(); i++){
320  mcLinks.push_back(mcFairLinks.GetLink(i));
321  }
322 
323  std::sort(mcLinks.begin(), mcLinks.end(), [](const FairLink& a, const FairLink& b) -> bool {
324  return a.GetIndex() < b.GetIndex();
325  });
326 
327  fMcList.clear();
328  for (auto link : mcLinks)
329  fMcList.push_back(link.GetIndex());
330  return fMcList;
331 }
Int_t i
Definition: run_full.C:25
TTree * b
Int_t a
Definition: anaLmdDigi.C:126
std::vector< Int_t > fMcList
Int_t PndEmcCluster::GetMcSize ( )
inlineinherited

Definition at line 115 of file PndEmcCluster.h.

References PndEmcCluster::fMcList.

115 { return fMcList.size(); }
std::vector< Int_t > fMcList
Short_t PndEmcCluster::GetModule ( ) const
inherited

Definition at line 282 of file PndEmcCluster.cxx.

References PndEmcCluster::fLocalMaxMap, and PndEmcCluster::fMemberDigiMap.

Referenced by analysis_cluster_energyCorrection_Ntuple(), analysis_digi_cluster_7gammaAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_fwendcap(), analysis_digi_cluster_fwendcap(), PndEmcDigiCalibrator::CalibrationEvtTimeByBump(), PndPidCorrelator::ConstructNeutralCandidate(), emc_correction_hist(), emc_correction_parametrization(), PndEmcClusterHistCalibrator::Energy(), PndEmcAnalysis::Exec(), PndPidCorrelator::Exec(), PndPidCorrelator::GetEmcInfo(), PndEmcErrorMatrix::GetErrorMatrix(), PndPidCorrelator::GetFscInfo(), PndEmcDigiCalibrator::GetTimeResolutionOfShower(), and PndEmcClusterHistCalibrator::Where().

283 {
284  // Get module in which cluster is located
285  // If fLocalMaxMap is defined, i.e. after bump splitting procedure
286  // the number of module if taken from the first local maxima.
287  // Otherwise it is taken from the first digi in cluster.
288  Short_t module;
289  Int_t detectorId;
290  if (fLocalMaxMap.size()>0)
291  {
292  std::map<Int_t,Int_t>::const_iterator iter=fLocalMaxMap.begin();
293  detectorId=iter->first;
294  }
295  else
296  {
297  std::map<Int_t,Int_t>::const_iterator iter=fMemberDigiMap.begin();
298  detectorId=iter->first;
299  }
300 
301  module=detectorId/100000000;
302 
303  return module;
304 };
std::map< Int_t, Int_t > fMemberDigiMap
std::map< Int_t, Int_t > fLocalMaxMap
FairMultiLinkedData PndEmcCluster::GetTrackEntering ( ) const
inlineinherited
FairMultiLinkedData PndEmcCluster::GetTrackExiting ( ) const
inlineinherited

Definition at line 118 of file PndEmcCluster.h.

References PndEmcCluster::fTrackExiting.

Referenced by PndEmcCluster::addCluster().

118 { return fTrackExiting;}
FairMultiLinkedData fTrackExiting
bool PndEmcCluster::IsEnergyValid ( ) const
inlineinherited

Definition at line 77 of file PndEmcCluster.h.

References PndEmcCluster::fEnergyValid.

Referenced by PndEmcCorrBump::Exec(), and PndEmcExpClusterSplitter::Exec().

77 {return fEnergyValid;};
bool PndEmcCluster::isInCluster ( PndEmcDigi theDigi,
const TClonesArray *  digiArray 
)
inherited

Definition at line 234 of file PndEmcCluster.cxx.

References PndEmcCluster::fDigiList, and PndEmcDigi::isNeighbour().

Referenced by PndEmcMakeClusterOnline::Exec(), and PndEmcMakeCluster::Exec().

235 {
236  vector<Int_t>::iterator digi_iter;
237  for (digi_iter=fDigiList.begin();digi_iter!=fDigiList.end();++digi_iter)
238  {
239  if(theDigi->isNeighbour((PndEmcDigi *) digiArray->At(*digi_iter))) return true;
240  }
241 
242  return false;
243 }
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
std::vector< Int_t > fDigiList
bool isNeighbour(const PndEmcDigi *theDigi) const
Definition: PndEmcDigi.cxx:201
bool PndEmcCluster::IsPositionValid ( ) const
inlineinherited

Definition at line 78 of file PndEmcCluster.h.

References PndEmcCluster::fWhereValid.

Referenced by PndEmcCorrBump::Exec(), and PndEmcExpClusterSplitter::Exec().

78 {return fWhereValid;};
Double_t PndEmcCluster::LatMom ( ) const
inlineinherited
const std::map<Int_t,Int_t>& PndEmcCluster::LocalMaxMap ( ) const
inlineinherited

Definition at line 42 of file PndEmcCluster.h.

References PndEmcCluster::fLocalMaxMap.

Referenced by PndEmc2DLocMaxFinder::Exec(), PndEmcAnalysis::Exec(), and PndEmcExpClusterSplitter::Exec().

42 {return fLocalMaxMap;};
std::map< Int_t, Int_t > fLocalMaxMap
void PndEmcBump::MadeFrom ( Int_t  clusterIndex)
virtual

Copy

Definition at line 76 of file PndEmcBump.cxx.

References fClusterIndex.

Referenced by PndEmcExpClusterSplitter::Exec(), and PndEmcPhiBumpSplitter::Exec().

77 {
78  fClusterIndex = clusterIndex;
79 }
Int_t fClusterIndex
Definition: PndEmcBump.h:61
const PndEmcDigi * PndEmcCluster::Maxima ( const TClonesArray *  digiArray) const
virtualinherited

Definition at line 247 of file PndEmcCluster.cxx.

References digi, Double_t, PndEmcCluster::fDigiList, PndEmcDigi::GetEnergy(), and max().

Referenced by PndEmcClusterEnergySums::E1(), PndEmcClusterEnergySums::E25(), PndEmcClusterEnergySums::E9(), PndEmc2DLocMaxFinder::Exec(), PndEmcMakeCluster::FinishCluster(), and PndEmcXClMoments::Init().

248 {
249  Double_t max=0;
250  PndEmcDigi *biggest=0;
251 
252  std::vector<Int_t>::const_iterator digipos;
253  for (digipos=fDigiList.begin();digipos!=fDigiList.end();++digipos){
254  PndEmcDigi *digi = (PndEmcDigi *) digiArray->At(*digipos);
255  if ( max < digi->GetEnergy() ) {
256  max=digi->GetEnergy();
257  biggest=digi;
258  }
259  }
260 
261  return( biggest );
262 }
TClonesArray * digi
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
Double_t
std::vector< Int_t > fDigiList
PndEmcDigi * PndEmcCluster::Maxima ( const TClonesArray *  digiArray)
virtualinherited

Definition at line 265 of file PndEmcCluster.cxx.

References digi, Double_t, PndEmcCluster::fDigiList, PndEmcDigi::GetEnergy(), and max().

266 {
267  Double_t max=0;
268  PndEmcDigi *biggest=0;
269 
270  std::vector<Int_t>::iterator digipos;
271  for (digipos=fDigiList.begin();digipos!=fDigiList.end();++digipos){
272  PndEmcDigi *digi = (PndEmcDigi *) digiArray->At(*digipos);
273  if ( max < digi->GetEnergy() ) {
274  max=digi->GetEnergy();
275  biggest=digi;
276  }
277  }
278 
279  return( biggest );
280 }
TClonesArray * digi
virtual Double_t GetEnergy() const
Definition: PndEmcDigi.cxx:296
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: P4_F32vec4.h:26
Double_t
std::vector< Int_t > fDigiList
const std::map<Int_t,Int_t>& PndEmcCluster::MemberDigiMap ( ) const
inlineinherited
Int_t PndEmcCluster::NBumps ( ) const
inherited

Definition at line 346 of file PndEmcCluster.cxx.

References PndEmcCluster::fNbumps.

Referenced by PndPidCorrelator::ConstructNeutralCandidate(), PndEmcAnalysis::Exec(), and PndPidCorrelator::GetEmcInfo().

347 {
348  return fNbumps;
349 }
unsigned fNbumps
Int_t PndEmcCluster::NumberOfDigis ( ) const
inherited
PndEmcBump& PndEmcBump::operator= ( const PndEmcBump rv)
private
Double_t PndEmcCluster::phi ( ) const
inherited
TVector3 PndEmcCluster::position ( ) const
inherited

Definition at line 104 of file PndEmcCluster.cxx.

References PndEmcCluster::where().

Referenced by PndEmcMakeRecoHit::Exec(), PndEmcPhiBumpSplitter::Exec(), and PndPidBremCorrector::GetSepPhotonE().

105 {
106  return this->where();
107 }
TVector3 where() const
void PndEmcCluster::Print ( const Option_t *  opt = "") const
virtualinherited

Definition at line 357 of file PndEmcCluster.cxx.

References PndEmcCluster::energy(), PndEmcCluster::fTrackEntering, and PndEmcCluster::fTrackExiting.

358 {
359  std::cout<<"*********************************"<< endl;
360  std::cout<<"total energy of cluster: "<< energy() << endl;
361  std::cout <<"TrackEntering: " << fTrackEntering << std::endl;
362  std::cout <<"TrackExiting: " << fTrackExiting << std::endl;
363 }
FairMultiLinkedData fTrackExiting
FairMultiLinkedData fTrackEntering
virtual Double_t energy() const
void PndEmcBump::Print ( Int_t  iBump) const
virtual

Definition at line 67 of file PndEmcBump.cxx.

References PndEmcCluster::DigiList(), and PndEmcCluster::energy().

68 {
69  std::cout<<"Bump["<<iBump<<"], (digis, E)=("<<DigiList().size()<<", "<<energy()<<")"<<endl;
70 }
const std::vector< Int_t > & DigiList() const
Definition: PndEmcCluster.h:40
virtual Double_t energy() const
void PndEmcCluster::removeDigi ( const TClonesArray *  digiArray,
Int_t  iDigi 
)
virtualinherited

Definition at line 177 of file PndEmcCluster.cxx.

References digi, PndEmcCluster::fDigiList, PndEmcCluster::fMcMap, PndEmcCluster::fMemberDigiMap, PndEmcDigi::GetDetectorId(), PndEmcDigi::GetTrackId(), and i.

Referenced by PndEmcClusterRemoveDuplCrys::Exec(), and PndEmcCorrBump::Exec().

178 {
179  for(size_t i=0;i<fDigiList.size();++i){
180  if(fDigiList[i] == iDigi){
181  fDigiList.erase(fDigiList.begin()+i);
182  break;
183  }
184  }
185  PndEmcDigi *digi= (PndEmcDigi *) digiArray->At(iDigi);
186  Int_t detectorId =digi->GetDetectorId();
187  fMemberDigiMap.erase(detectorId);
188  --fMcMap[digi->GetTrackId()];
189 }
TClonesArray * digi
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t i
Definition: run_full.C:25
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
std::map< Int_t, Int_t > fMcMap
Int_t GetTrackId() const
Definition: PndEmcDigi.h:96
std::map< Int_t, Int_t > fMemberDigiMap
std::vector< Int_t > fDigiList
std::vector< Int_t >::iterator PndEmcCluster::removeDigi ( const TClonesArray *  digiArray,
std::vector< Int_t >::iterator  it 
)
virtualinherited

Definition at line 191 of file PndEmcCluster.cxx.

References digi, PndEmcCluster::fDigiList, PndEmcCluster::fMcMap, PndEmcCluster::fMemberDigiMap, PndEmcDigi::GetDetectorId(), and PndEmcDigi::GetTrackId().

192 {
193  PndEmcDigi *digi= (PndEmcDigi *) digiArray->At(*iDigi);
194  //std::cout << "removing digi (ptr|detId): (" << digi << " | " << digi->GetDetectorId() << ")" << std::endl;
195 
196  std::map<Int_t, Int_t>::iterator it = fMemberDigiMap.find(digi->GetDetectorId());
197  if(it != fMemberDigiMap.end() && it->second == *iDigi) {
198  fMemberDigiMap.erase(it);
199  }
200 
201  --fMcMap[digi->GetTrackId()];
202  return fDigiList.erase(iDigi);
203 }
TClonesArray * digi
represents the reconstructed hit of one emc crystal
Definition: PndEmcDigi.h:40
Int_t GetDetectorId() const
Definition: PndEmcDigi.h:97
std::map< Int_t, Int_t > fMcMap
Int_t GetTrackId() const
Definition: PndEmcDigi.h:96
std::map< Int_t, Int_t > fMemberDigiMap
std::vector< Int_t > fDigiList
void PndEmcCluster::SetEnergy ( Double_t  en)
inlineinherited
void PndEmcBump::SetEventNo ( Int_t  evtNo)
inline

Definition at line 57 of file PndEmcBump.h.

References fEvtNo.

Referenced by PndEmcCorrBump::Exec(), and PndEmcExpClusterSplitter::Exec().

57 { fEvtNo = evtNo; }
Int_t fEvtNo
Definition: PndEmcBump.h:62
void PndEmcCluster::SetLatMom ( Double_t  latMom)
inlineinherited
void PndEmcCluster::SetNBumps ( unsigned  nbumps)
virtualinherited

Definition at line 352 of file PndEmcCluster.cxx.

References PndEmcCluster::fNbumps.

Referenced by PndEmcExpClusterSplitter::Exec(), and PndEmcBump().

352  {
353  fNbumps = nbumps;
354 }
unsigned fNbumps
void PndEmcCluster::SetPosition ( TVector3  pos)
inlineinherited
void PndEmcCluster::SetTrackEntering ( const FairMultiLinkedData &  tracks)
inlineinherited

Definition at line 105 of file PndEmcCluster.h.

References PndEmcCluster::fTrackEntering.

Referenced by PndEmcMakeCluster::Exec().

105 {fTrackEntering = tracks;}
FairMultiLinkedData fTrackEntering
void PndEmcCluster::SetTrackExiting ( const FairMultiLinkedData &  tracks)
inlineinherited

Definition at line 106 of file PndEmcCluster.h.

References PndEmcCluster::fTrackExiting.

Referenced by PndEmcMakeCluster::Exec().

106 {fTrackExiting = tracks;}
FairMultiLinkedData fTrackExiting
void PndEmcCluster::SetZ20 ( Double_t  z20)
inlineinherited
void PndEmcCluster::SetZ53 ( Double_t  z53)
inlineinherited
Double_t PndEmcCluster::theta ( ) const
inherited
TVector3 PndEmcCluster::where ( ) const
inherited

Definition at line 111 of file PndEmcCluster.cxx.

References PndEmcCluster::fWhere, and PndEmcCluster::fWhereValid.

Referenced by analysis_digi_cluster_7gammaAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_FullEmc(), analysis_digi_cluster_allGammasAnalysis_fwendcap(), analysis_digi_cluster_fwendcap(), PndEmcDigiCalibrator::CalibrationEvtTimeByBump(), PndPidCorrelator::ConstructNeutralCandidate(), PndEmcCluster::DistanceToCentre(), emc_correction_hist(), emc_correction_parametrization(), emc_correction_QA(), PndEmcClusterHistCalibrator::Energy(), PndEmcClusterSimpleCalibrator::Energy(), error_matrix_fit(), PndEmcMakeCorr::Exec(), PndEmcAnalysis::Exec(), for(), PndEmcErrorMatrix::Get4MomentumErrorMatrix(), PndPidCorrelator::GetEmcInfo(), PndEmcCluster::GetEnergyCorrected(), GetEntriesFast(), PndEmcErrorMatrix::GetErrorP7(), PndPidCorrelator::GetFscInfo(), PndEmcClusterDraw::GetVector(), if(), PndEmcCluster::phi(), PndEmcClusterDistances::PndEmcClusterDistances(), PndEmcCluster::position(), QAmacro_emc_3(), reco_analys(), PndEmcClusterMoments::SecondMomentTP(), PndEmcCluster::theta(), PndEmcClusterHistCalibrator::Where(), PndEmcClusterSimpleCalibrator::Where(), PndEmcCluster::x(), PndEmcCluster::y(), and PndEmcCluster::z().

112 {
113  if (fWhereValid)
114  return fWhere;
115  else
116  {
117  std::cout<<"Position of cluster is not defined"<<std::endl;
118  abort();
119  }
120 }
TVector3 fWhere
Double_t PndEmcCluster::x ( ) const
inherited
Double_t PndEmcCluster::y ( ) const
inherited
Double_t PndEmcCluster::z ( ) const
inherited
Double_t PndEmcCluster::Z20 ( ) const
inlineinherited
Double_t PndEmcCluster::Z53 ( ) const
inlineinherited

Member Data Documentation

Int_t PndEmcBump::fClusterIndex
protected

Definition at line 61 of file PndEmcBump.h.

Referenced by GetClusterIndex(), and MadeFrom().

std::vector<Int_t> PndEmcCluster::fDigiList
protectedinherited
Double_t PndEmcCluster::fEnergy
protectedinherited

Definition at line 147 of file PndEmcCluster.h.

Referenced by PndEmcCluster::energy(), and PndEmcCluster::SetEnergy().

bool PndEmcCluster::fEnergyValid
protectedinherited
Int_t PndEmcBump::fEvtNo
protected

Definition at line 62 of file PndEmcBump.h.

Referenced by GetEventNo(), and SetEventNo().

Double_t PndEmcCluster::fLatMom
protectedinherited

Definition at line 153 of file PndEmcCluster.h.

Referenced by PndEmcCluster::LatMom(), and PndEmcCluster::SetLatMom().

std::map<Int_t,Int_t> PndEmcCluster::fLocalMaxMap
protectedinherited
std::vector<Int_t> PndEmcCluster::fMcList
mutableprotectedinherited
std::map<Int_t, Int_t> PndEmcCluster::fMcMap
mutableprotectedinherited

Definition at line 142 of file PndEmcCluster.h.

Referenced by PndEmcCluster::addDigi(), and PndEmcCluster::removeDigi().

std::map<Int_t,Int_t> PndEmcCluster::fMemberDigiMap
protectedinherited
unsigned PndEmcCluster::fNbumps
protectedinherited

Definition at line 150 of file PndEmcCluster.h.

Referenced by PndEmcCluster::NBumps(), and PndEmcCluster::SetNBumps().

FairMultiLinkedData PndEmcCluster::fTrackEntering
protectedinherited
FairMultiLinkedData PndEmcCluster::fTrackExiting
protectedinherited
TVector3 PndEmcCluster::fWhere
protectedinherited

Definition at line 149 of file PndEmcCluster.h.

Referenced by PndEmcCluster::SetPosition(), and PndEmcCluster::where().

bool PndEmcCluster::fWhereValid
protectedinherited
Double_t PndEmcCluster::fZ20
protectedinherited

Definition at line 151 of file PndEmcCluster.h.

Referenced by PndEmcCluster::SetZ20(), and PndEmcCluster::Z20().

Double_t PndEmcCluster::fZ53
protectedinherited

Definition at line 152 of file PndEmcCluster.h.

Referenced by PndEmcCluster::SetZ53(), and PndEmcCluster::Z53().


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