FEDRA emulsion software from the OPERA Collaboration
EdbShowerP Class Reference

#include <EdbShowerP.h>

Inheritance diagram for EdbShowerP:
Collaboration diagram for EdbShowerP:

Classes

struct  MCInfo_Event
 
struct  MCInfo_PGun
 
struct  Para_AS
 
struct  Para_ExtraInfo
 
struct  Para_FJ
 
struct  Para_JC
 
struct  Para_LT
 
struct  Para_PP
 
struct  Para_SE
 
struct  Para_XX
 
struct  Para_YC
 
struct  Para_YY
 
struct  Reco_E
 
struct  Reco_ID
 
struct  Reco_Vtx
 

Public Member Functions

void AddSegment (EdbSegP *s)
 
void AddSegmentAndUpdate (EdbSegP *s)
 
void AddShower (EdbShowerP *show)
 
void BuildNMC ()
 
void BuildNplN0 ()
 
void BuildParametrisation (Int_t ParaNr)
 
void BuildParametrisation_AS ()
 
void BuildParametrisation_ExtraInfo ()
 
void BuildParametrisation_FJ ()
 
void BuildParametrisation_JC ()
 
void BuildParametrisation_LT ()
 
void BuildParametrisation_PP ()
 
void BuildParametrisation_SE ()
 
void BuildParametrisation_XX ()
 
void BuildParametrisation_YC ()
 
void BuildParametrisation_YY ()
 
void BuildPlateProfile ()
 
void BuildProfiles ()
 
void BuildShowerAxis ()
 
Double_t CalcDistLongitudinal (EdbSegP *, EdbSegP *)
 
Double_t CalcDistTransversal (EdbSegP *, EdbSegP *)
 
Double_t CalcIP (EdbSegP *, double, double, double)
 
Double_t CalcIP (EdbSegP *, EdbVertex *)
 
Float_t CalcOpenAngle (Int_t type)
 
Float_t CalcOpenAngleSimple ()
 
void CalcPurity ()
 
void CalcShowerAngularDeviationDistribution ()
 
void CalcSphericity ()
 
void Clear ()
 
void ClearAll ()
 
void ClearProfileLongitudinalHisto ()
 
void ClearProfileTransversalHisto ()
 
 EdbShowerP (int nseg=0)
 
 EdbShowerP (int number1, int number2, int number3, int nseg=0)
 
void Finalize ()
 
Bool_t GetExtraInfoIsDone (Int_t nr) const
 
Float_t GetFirstZ () const
 
Float_t GetLastZ () const
 
Int_t GetM () const
 
MCInfo_Event GetMCInfo_Event () const
 
MCInfo_PGun GetMCInfo_PGun () const
 
Bool_t GetMCInfoIsDone (Int_t nr) const
 
Int_t GetNBT () const
 
Int_t GetNBTMC () const
 
Int_t GetNBTMCFlag (Int_t PdgArray) const
 
Int_t GetNBTMCFlagPlate (Int_t PIDdiff, Int_t PdgArray) const
 
Int_t GetNBTMCPlate (Int_t PIDdiff) const
 
Int_t GetNBTPlate (Int_t PIDdiff) const
 
Para_AS GetPara_AS () const
 
Para_ExtraInfo GetPara_ExtraInfo () const
 
Para_FJ GetPara_FJ () const
 
Para_JC GetPara_JC () const
 
Para_LT GetPara_LT () const
 
Para_PP GetPara_PP () const
 
Para_SE GetPara_SE () const
 
Para_XX GetPara_XX () const
 
Para_YC GetPara_YC () const
 
Para_YY GetPara_YY () const
 
Bool_t GetParametrisationIsDone (Int_t nr) const
 
Float_t GetParaVariable (Int_t ParaVariable, Int_t ParaNr)
 
Int_t GetPDG () const
 
TH1F * GetProfileLongitudinal () const
 
TH1F * GetProfileLongitudinalPlate ()
 
TH1F * GetProfileTransversal () const
 
Float_t GetPurity () const
 
EdbSegPGetSegment (int i) const
 
Float_t GetSegmentAngle () const
 
TObjArray * GetSegmentArray ()
 
EdbSegPGetSegmentFirst () const
 
Float_t GetSegmentFirstZ () const
 
EdbSegPGetSegmentGravity () const
 
EdbSegPGetSegmentLast () const
 
Float_t GetSegmentLastZ () const
 
Float_t GetSphericity () const
 
void Help ()
 
void Init ()
 
Bool_t IsSorted ()
 
Float_t M () const
 
void MergeFromShower (EdbShowerP *show, Int_t MergingType=1)
 -— EXPERIMENTAL STATUS — More...
 
void MergeFromShowerByAddress (EdbShowerP *show)
 
void MergeFromShowerByPosition (EdbShowerP *show)
 
Int_t N () const
 
Int_t N0 () const
 
Int_t N00 () const
 
Int_t Npl () const
 
Int_t PDG () const
 
void Print ()
 -— EXPERIMENTAL STATUS — More...
 
void PrintAll ()
 
void PrintBasics ()
 
void PrintMCInfo_PGun ()
 
void PrintMetaData ()
 
void PrintNice ()
 
void PrintParametrisation (Int_t ParaNr=0)
 
void PrintParametrisation_AS ()
 
void PrintParametrisation_ExtraInfo ()
 
void PrintParametrisation_FJ ()
 
void PrintParametrisation_JC ()
 
void PrintParametrisation_LT ()
 
void PrintParametrisation_PP ()
 
void PrintParametrisation_SE ()
 
void PrintParametrisation_XX ()
 
void PrintParametrisation_YC ()
 
void PrintParametrisation_YY ()
 
void PrintSegments ()
 
void RemoveSegment (EdbSegP *s, Bool_t UpdateAll=kFALSE)
 
void Set0 ()
 
void Set0Parametrizations ()
 
void SetAlgName (TString AlgName)
 
void SetAlgParaString (Int_t ParaStringNr, TString ParaString)
 
void SetAlgParaValue (Int_t ParaValueNr, Float_t ParaValue)
 
void SetAlgValue (Int_t AlgValue)
 
void SetCounters ()
 
void SetExtraInfoIsDone (Int_t nr, Bool_t IsDone)
 
void SetM (float m)
 
void SetMCInfo_Event (MCInfo_Event fMCInfo_Event)
 
void SetMCInfo_PGun (MCInfo_PGun fMCInfo_PGun)
 
void SetMCInfoIsDone (Int_t nr, Bool_t IsDone)
 
void SetN0 ()
 
void SetN0 (int n0)
 
void SetN00 ()
 
void SetN00 (int n00)
 
void SetNpl ()
 
void SetNpl (int npl)
 
void SetParaVariable (Float_t fParVar, Int_t ParaVariable, Int_t ParaNr)
 
void SetPDG (int pdg)
 
void SetSegmentArray (TObjArray *segArray)
 
void Sort ()
 
EdbTrackPTrackAS () const
 
void Update ()
 
void UpdateX ()
 
EdbVTAVTAS () const
 
virtual ~EdbShowerP ()
 
- Public Member Functions inherited from EdbSegP
void addEMULDigit (TObject *a)
 
Int_t Aid (int i) const
 
bool CheckCOV () const
 
Float_t Chi2 () const
 
void Clear ()
 
Int_t Compare (const TObject *obj) const
 
void Copy (const EdbSegP &s)
 
TMatrixD & COV () const
 
Float_t DeltaR (EdbSegP *seg1) const
 
Float_t DeltaTheta (EdbSegP *seg1) const
 
Float_t DZ () const
 
Float_t DZem () const
 
 EdbSegP ()
 
 EdbSegP (const EdbSegP &s)
 
 EdbSegP (int id, float x, float y, float tx, float ty, float w=0, int flag=0)
 
TRefArray * EMULDigitArray () const
 
Int_t Flag () const
 
void ForceCOV (TMatrixD &cov)
 
Int_t ID () const
 
bool IsCompatible (EdbSegP &s, float nsigx, float nsigt) const
 
Bool_t IsEqual (const TObject *obj) const
 
bool IsInside (float xmin, float xmax, float ymin, float ymax) const
 
bool IsInside (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) const
 
Bool_t IsSortable () const
 
Int_t MCEvt () const
 
Int_t MCTrack () const
 
void MergeTo (EdbSegP &s)
 
Float_t P () const
 
Float_t Phi () const
 
Int_t PID () const
 
Int_t Plate () const
 
void Print (Option_t *opt="") const
 
void PrintNice () const
 
Float_t Prob () const
 
Float_t ProbLink (EdbSegP &s1, EdbSegP &s2)
 
void PropagateTo (float z)
 
void PropagateToCOV (float z)
 
void PropagateToDZ (float dz)
 
EdbID ScanID () const
 
void Set (int id, float x, float y, float tx, float ty, float w, int flag)
 
void Set0 ()
 
void SetAid (int a, int v, int side=0)
 
void SetChi2 (float chi2)
 
void SetCOV (double *array, int dim=5)
 
void SetCOV (TMatrixD &cov)
 
void SetDZ (float dz)
 
void SetDZem (float dz)
 
void SetErrorP (float sp2)
 
void SetErrors ()
 
void SetErrors (float sx2, float sy2, float sz2, float stx2, float sty2, float sp2=1.)
 
void SetErrors0 ()
 
void SetErrorsCOV (float sx2, float sy2, float sz2, float stx2, float sty2, float sp2=1.)
 
void SetFlag (int flag)
 
void SetID (int id)
 
void SetMC (int mEvt, int mTrack)
 
void SetP (float p)
 
void SetPID (int pid)
 
void SetPlate (int plateid)
 
void SetProb (float prob)
 
void SetProbability (float p)
 
void SetScanID (EdbID id)
 
void SetSide (int side=0)
 
void SetSZ (float sz)
 
void SetTrack (int trid)
 
void SetTX (Float_t tx)
 
void SetTY (Float_t ty)
 
void SetVid (int vid, int sid)
 
void SetVolume (float w)
 
void SetW (float w)
 
void SetX (Float_t x)
 
void SetY (Float_t y)
 
void SetZ (float z)
 
Int_t Side () const
 
Float_t SP () const
 
Float_t STX () const
 
Float_t STY () const
 
Float_t SX () const
 
Float_t SY () const
 
Float_t SZ () const
 
Float_t Theta () const
 
Int_t Track () const
 
Float_t TX () const
 
Float_t TY () const
 
Int_t Vid (int i) const
 
Float_t Volume () const
 
Float_t W () const
 
Float_t X () const
 
Float_t Y () const
 
Float_t Z () const
 
virtual ~EdbSegP ()
 
- Public Member Functions inherited from EdbTrack2D
virtual void Substruct (EdbTrack2D *t)
 
virtual void Test () const
 
virtual void Transform (const EdbAffine2D *a)
 
virtual ~EdbTrack2D ()
 
- Public Member Functions inherited from EdbPoint2D
virtual void SetX (float x)=0
 
virtual void SetY (float y)=0
 
virtual void Substruct (EdbPoint *p)
 
virtual void TestPoint2D () const
 
virtual ~EdbPoint2D ()
 
- Public Member Functions inherited from EdbPoint
virtual void Transform (const EdbAffine3D *a)
 
virtual ~EdbPoint ()
 
- Public Member Functions inherited from EdbAngle2D
virtual void SetTX (float x)=0
 
virtual void SetTY (float y)=0
 
virtual void Substruct (const EdbAngle2D *a)
 
virtual ~EdbAngle2D ()
 

Public Attributes

MCInfo_Event eMCInfo_Event
 
MCInfo_PGun eMCInfo_PGun
 
Para_AS ePara_AS
 
Para_ExtraInfo ePara_ExtraInfo
 
Para_FJ ePara_FJ
 
Para_JC ePara_JC
 
Para_LT ePara_LT
 
Int_t ePara_N
 
Para_PP ePara_PP
 
Para_SE ePara_SE
 
Para_XX ePara_XX
 
Para_YC ePara_YC
 
Para_YY ePara_YY
 
Reco_E eReco_E
 
TObjArray * eReco_E_Array
 
TObjArray * eReco_ID_Array
 
Reco_Vtx eReco_Vtx
 
TObjArray * eReco_Vtx_Array
 
- Public Attributes inherited from EdbSegP
Float_t eTX
 
Float_t eTY
 
Float_t eX
 
Float_t eY
 
Float_t eZ
 

Private Member Functions

Double_t GetdMin (EdbSegP *seg1, EdbSegP *seg2)
 
Double_t GetdR (EdbSegP *seg1, EdbSegP *seg2)
 
Double_t GetdT (EdbSegP *seg1, EdbSegP *seg2)
 
Int_t GetLastFilledBin (TH1 *hist)
 

Private Attributes

TString eAlgName
 
Int_t eAlgValue
 
Float_t eEnergy
 
Float_t eEnergyCorrected
 
Float_t eEnergyMC
 
Float_t eEnergyUncorrected
 
Bool_t eExtraInfoIsDone [2]
 
Short_t eFirstPlate
 
Short_t eFirstPlatePID
 
Short_t eFirstPlateZ
 
Float_t eFirstZ
 
Short_t eId
 
Short_t eLastPlate
 
Short_t eLastPlatePID
 
Short_t eLastPlateZ
 
Float_t eLastZ
 
TString eLongitudinalProfileName
 
Float_t eM
 vertex to which the shower start is attached to More...
 
Int_t eMC
 
Bool_t eMCInfoIsDone [2]
 
Int_t eN0
 
Int_t eN00
 
Int_t eNBT
 
Int_t eNBTMC
 
Int_t eNBTMCFlag [99]
 
Int_t eNBTMCFlagPlate [57][99]
 
Int_t eNBTMCPlate [57]
 
Int_t eNBTPlate [57]
 
Int_t eNpl
 
Bool_t eParametrisationIsDone [10]
 
TString eParaString [10]
 
Float_t eParaValue [10]
 
Int_t ePDG
 
Short_t ePDGId
 
TH1F * eProfileLongitudinal
 
TH1F * eProfileTransversal
 
Float_t ePurity
 
TObjArray * eS
 
Float_t eShowerAngularDeviationTXDistribution_mean
 
Float_t eShowerAngularDeviationTXDistribution_sigma
 
Float_t eShowerAngularDeviationTYDistribution_mean
 
Float_t eShowerAngularDeviationTYDistribution_sigma
 
Float_t eShowerAxisAngle
 
EdbSegPeShowerAxisCenterGravityBT
 
Float_t eSphericity
 
EdbTrackPeTrackAS
 
TString eTransversalProfileName
 
EdbVTAeVTAS
 track to which the shower start is attached to More...
 

Additional Inherited Members

- Static Public Member Functions inherited from EdbSegP
static Float_t Angle (const EdbSegP &s1, const EdbSegP &s2)
 
static Float_t Distance (const EdbSegP &s1, const EdbSegP &s2)
 
static void LinkMT (const EdbSegP *s1, const EdbSegP *s2, EdbSegP *s)
 
- Protected Attributes inherited from EdbSegP
TMatrixD * eCOV
 

Constructor & Destructor Documentation

◆ EdbShowerP() [1/2]

EdbShowerP::EdbShowerP ( int  nseg = 0)
11 {
12  // Default constructor, empty shower
13  if (gEDBDEBUGLEVEL>4) cout << "EdbShowerP::EdbShowerP(int nseg) CONSTRUCTOR" << endl;
14 
15  Init();
16  SetNpl(-999);
17  SetN0(-999);
18  Set0();
19 
20  // Create ObjArray for the Segments:
21  if (nseg>0) eS = new TObjArray(9999);
22 
23  if (!eProfileLongitudinal) {
24  eProfileLongitudinal = new TH1F("ProfileLongitudinal","ProfileLongitudinal",56,0,56.0*1300.0);
25  if (gEDBDEBUGLEVEL>3) cout << "CONSTRUCTOR: eProfileLongitudinal created..." << eProfileLongitudinal << endl;
26  }
27  if (!eProfileTransversal) {
28  eProfileTransversal = new TH1F("ProfileTransversal","ProfileTransversal",8,0,800);
29  if (gEDBDEBUGLEVEL>3) cout << "CONSTRUCTOR: eProfileTransversal created..." << eProfileTransversal << endl;
30  }
31 
32  eLongitudinalProfileName="ProfileLongitudinal";
33  eTransversalProfileName="ProfileTransversal";
34 }
TString eTransversalProfileName
Definition: EdbShowerP.h:36
void Init()
Definition: EdbShowerP.cxx:114
void Set0()
Definition: EdbShowerP.cxx:127
TH1F * eProfileLongitudinal
Definition: EdbShowerP.h:86
TObjArray * eS
Definition: EdbShowerP.h:61
void SetN0()
Definition: EdbShowerP.h:397
TH1F * eProfileTransversal
Definition: EdbShowerP.h:87
void SetNpl()
Definition: EdbShowerP.h:406
TString eLongitudinalProfileName
Definition: EdbShowerP.h:35
gEDBDEBUGLEVEL
Definition: energy.C:7

◆ EdbShowerP() [2/2]

EdbShowerP::EdbShowerP ( int  number1,
int  number2,
int  number3,
int  nseg = 0 
)
41 {
42  // Constructor with numbers to make the histograms have a unique name
43 
44  if (gEDBDEBUGLEVEL>4) {
45  cout << "EdbShowerP::EdbShowerP(int number1, int number2, int number3, int nseg) CONSTRUCTOR" << endl;
46  cout << "EdbShowerP::EdbShowerP number 1 = " << number1 << endl;
47  cout << "EdbShowerP::EdbShowerP number 2 = " << number2 << endl;
48  cout << "EdbShowerP::EdbShowerP number 3 = " << number3 << endl;
49  }
50 
51  // default constructor, empty shower
52  Init();
53  SetNpl(-999);
54  SetN0(-999);
55  Set0();
56 
57  // Create ObjArray for the Segments:
58  if (nseg>0) eS = new TObjArray(9999);
59 
60  // To make each histogram unique... Strange workaround....
61  // But otherwise the single histograms will be overwritten and root will give warnings...
62  // But be careful! In this mode you will get rid of the warnings, but you will
63  // __NOT__ be able to access the histograms by their names anymore..:
64  // convention (->see in "Execute()" function of the algorithm)
65  // // number1 = #InBT // // number2 = eAlgValue, // number3 = eActualAlgParametersetNr
66 
67  char hname[40];
68  sprintf(hname,"ProfileLongitudinal_%d_%d_%d",number1,number2,number3);
69  eLongitudinalProfileName=TString(hname);
70  if (!eProfileLongitudinal) eProfileLongitudinal = new TH1F(hname,"ProfileLongitudinal",56,0,56.0*1300.0);
71  sprintf(hname,"ProfileTransversal_%d_%d_%d",number1,number2,number3);
72  eTransversalProfileName=TString(hname);
73  if (!eProfileTransversal) eProfileTransversal = new TH1F(hname,"ProfileTransversal",8,0,800);
74 
75 }

◆ ~EdbShowerP()

EdbShowerP::~EdbShowerP ( )
virtual
80 {
81  // default destructor:
82  if (gEDBDEBUGLEVEL>4) cout<<"EdbShowerP::~EdbShowerP() DESTRUCTOR"<<endl;
83  if (eS) {
84  eS->Clear();
85  delete eS;
86  eS=0;
87  }
89  delete eProfileLongitudinal;
91  }
92  if (eProfileTransversal) {
93  delete eProfileTransversal;
95  }
99  }
100 
101  // Deletes internal histograms
102  Finalize();
103 
104  delete eReco_ID_Array;
105  delete eReco_E_Array;
106  delete eReco_Vtx_Array;
107 
108  if (gEDBDEBUGLEVEL>4) cout<<"EdbShowerP::~EdbShowerP() DESTRUCTOR...done."<<endl;
109 }
EdbSegP * eShowerAxisCenterGravityBT
Definition: EdbShowerP.h:95
TObjArray * eReco_ID_Array
Definition: EdbShowerP.h:368
TObjArray * eReco_Vtx_Array
Definition: EdbShowerP.h:370
void Finalize()
Definition: EdbShowerP.cxx:1026
TObjArray * eReco_E_Array
Definition: EdbShowerP.h:369

Member Function Documentation

◆ AddSegment()

void EdbShowerP::AddSegment ( EdbSegP s)
300 {
301  // Preliminary check if array is already existing:
302  if (!eS) eS = new TObjArray(9999);
303 
304  // Set XY... for the first (only!) BaseTrack in the shower.
305  if (eNBT==0) {
306  this->SetX(s->X());
307  this->SetY(s->Y());
308  this->SetZ(s->Z());
309  this->SetTX(s->TX());
310  this->SetTY(s->TY());
311  this->SetPID(s->PID());
312  eEnergyMC=s->P();
313  eMC=s->MCEvt();
314  SetMC(s->MCEvt(),s->MCEvt());
315  }
316 
317  // Add BaseTrack (segment) to shower
318  eS->Add(s);
319 
320  // Increase number of BaseTracks in shower
321  ++eNBT;
322  // Increase number of MC-BaseTracks in shower only in case of same(!) MCEvent number
323  if (s->MCEvt()>=0 && s->MCEvt()==eMC) ++eNBTMC;
324 
325  return;
326 }
void SetPID(int pid)
Definition: EdbSegP.h:126
void SetY(Float_t y)
Definition: EdbSegP.h:175
Float_t TX() const
Definition: EdbSegP.h:172
void SetTX(Float_t tx)
Definition: EdbSegP.h:176
void SetX(Float_t x)
Definition: EdbSegP.h:174
Float_t X() const
Definition: EdbSegP.h:170
Float_t Z() const
Definition: EdbSegP.h:150
void SetZ(float z)
Definition: EdbSegP.h:122
void SetTY(Float_t ty)
Definition: EdbSegP.h:177
Float_t P() const
Definition: EdbSegP.h:149
Float_t Y() const
Definition: EdbSegP.h:171
void SetMC(int mEvt, int mTrack)
Definition: EdbSegP.h:138
Int_t PID() const
Definition: EdbSegP.h:145
Float_t TY() const
Definition: EdbSegP.h:173
Int_t MCEvt() const
Definition: EdbSegP.h:142
Int_t eNBT
Definition: EdbShowerP.h:71
Int_t eMC
Definition: EdbShowerP.h:81
Float_t eEnergyMC
Definition: EdbShowerP.h:80
Int_t eNBTMC
Definition: EdbShowerP.h:72
EdbSegP * s
Definition: tlg2pattern.C:32

◆ AddSegmentAndUpdate()

void EdbShowerP::AddSegmentAndUpdate ( EdbSegP s)
332 {
333  AddSegment(s);
334  Update();
335  return;
336 }
void AddSegment(EdbSegP *s)
Definition: EdbShowerP.cxx:299
void Update()
Definition: EdbShowerP.cxx:975

◆ AddShower()

void EdbShowerP::AddShower ( EdbShowerP show)

◆ BuildNMC()

void EdbShowerP::BuildNMC ( )
401 {
402  Log(3,"EdbShowerP::BuildNMC()","BuildNMC()...done.");
403  // Increase number of MC-BaseTracks in shower only in case of same(!) MCEvent number
404  EdbSegP* s=0;
405  eNBTMC=0; // reset from beginning
406  for (int i=0; i<N(); ++i) {
407  s=GetSegment(i);
408  if (s->MCEvt()>=0 && s->MCEvt()==eMC) ++eNBTMC;
409  }
410  Log(3,"EdbShowerP::BuildNMC()","BuildNMC()...done.");
411  return;
412 }
bool Log(int level, const char *location, const char *fmt,...)
Definition: EdbLog.cxx:75
Definition: EdbSegP.h:18
Int_t N() const
Definition: EdbShowerP.h:412
EdbSegP * GetSegment(int i) const
Definition: EdbShowerP.h:435

◆ BuildNplN0()

void EdbShowerP::BuildNplN0 ( )
417 {
418  Log(3,"EdbShowerP::BuildNplN0()","BuildNplN0()");
419  EdbSegP* First = this->GetSegmentFirst();
420  EdbSegP* Last = this->GetSegmentLast();
421 
422  // For eN0, eNBTPlate has to be filled by BuildProfiles()
423  eNpl=TMath::Abs(First->PID()-Last->PID())+1;
424 
425  eN0=0;
426  for (int i=0; i<eNpl; i++) if (eNBTPlate[i]==0) ++eN0;
427 
428  int eN00int=0;
429  eN00=0;
430  for (int i=0; i<eNpl; i++) {
431  if (eNBTPlate[i]==0) {
432  eN00++;
433  if (eN00>eN00int) eN00int=eN00;
434  }
435  if (eNBTPlate[i]!=0) eN00=0;
436  }
437  eN00=eN00int;
438 
439  Log(3,"EdbShowerP::BuildNplN0()","BuildNplN0()...done.");
440  return;
441 }
EdbSegP * GetSegmentLast() const
Definition: EdbShowerP.h:432
Int_t eN0
Definition: EdbShowerP.h:63
Int_t eN00
Definition: EdbShowerP.h:77
Int_t eNpl
Definition: EdbShowerP.h:62
EdbSegP * GetSegmentFirst() const
Definition: EdbShowerP.h:429
Int_t eNBTPlate[57]
Definition: EdbShowerP.h:74

◆ BuildParametrisation()

void EdbShowerP::BuildParametrisation ( Int_t  ParaNr)
1191 {
1192  Log(3,"EdbShowerP::BuildParametrisation()","EdbShowerP::BuildParametrisation().");
1193  Log(3,"EdbShowerP::BuildParametrisation()","SOME ARE NOT YET IMPLEMENTED!");
1194  Log(3,"EdbShowerP::BuildParametrisation()","SOME DEPEND ON OTHERS, SO IF BUILD THESE, BUILD THE OTHERS BEFORE");
1195 
1196  switch (ParaNr) {
1197  case 0 :
1199  break;
1200  case 1 :
1201  BuildParametrisation_LT(); // needs FJ values.
1202  break;
1203  case 2 :
1205  break;
1206  case 3 :
1207  BuildParametrisation_JC(); // needs FJ and YC values.
1208  break;
1209  case 4 :
1211  break;
1212  case 5 :
1214  break;
1215  case 6 :
1217  break;
1218  case 7 :
1220  break;
1221  case 8 :
1223  break;
1224  default :
1225  cout << "BuildParametrisation //do nothing;" << endl;
1226  break;
1227  }
1228  Log(3,"EdbShowerP::BuildParametrisation()","EdbShowerP::BuildParametrisation()...done.");
1229  return;
1230 }
void BuildParametrisation_YY()
Definition: EdbShowerP.cxx:2106
void BuildParametrisation_XX()
Definition: EdbShowerP.cxx:2046
void BuildParametrisation_YC()
Definition: EdbShowerP.cxx:1775
void BuildParametrisation_PP()
Definition: EdbShowerP.cxx:2145
void BuildParametrisation_SE()
Definition: EdbShowerP.cxx:2192
void BuildParametrisation_AS()
Definition: EdbShowerP.cxx:2180
void BuildParametrisation_LT()
Definition: EdbShowerP.cxx:1761
void BuildParametrisation_JC()
Definition: EdbShowerP.cxx:2029
void BuildParametrisation_FJ()
Definition: EdbShowerP.cxx:1235

◆ BuildParametrisation_AS()

void EdbShowerP::BuildParametrisation_AS ( )
2181 {
2182  Log(3,"EdbShowerP::BuildParametrisation_AS()","EdbShowerP::BuildParametrisation_AS()");
2183  // Calculate this alues is contained in BuildParametrisation_FJ
2185  eParametrisationIsDone[7]=kTRUE;
2186  Log(3,"EdbShowerP::BuildParametrisation_AS()","EdbShowerP::BuildParametrisation_AS() ...done.");
2187  return;
2188 }
Bool_t eParametrisationIsDone[10]
Definition: EdbShowerP.h:44

◆ BuildParametrisation_ExtraInfo()

void EdbShowerP::BuildParametrisation_ExtraInfo ( )
2218 {
2219  Log(3,"EdbShowerP::BuildParametrisation_ExtraInfo()","EdbShowerP::BuildParametrisation_ExtraInfo()");
2223  if (N()>1 && (GetSegment(0)->Flag()+GetSegment(1)->Flag())==0) {
2225  }
2226  else {
2228  }
2230 
2231  eExtraInfoIsDone[0]=kTRUE;
2232  return;
2233 }
Int_t Flag() const
Definition: EdbSegP.h:146
Bool_t eExtraInfoIsDone[2]
Definition: EdbShowerP.h:45
Int_t Npl() const
Definition: EdbShowerP.h:409
Para_ExtraInfo ePara_ExtraInfo
Definition: EdbShowerP.h:361
Float_t InBT_Flag
Definition: EdbShowerP.h:261
Int_t ShowerLength
Definition: EdbShowerP.h:263
Float_t InPairBT_E
Definition: EdbShowerP.h:262
Float_t InBT_E
Definition: EdbShowerP.h:260

◆ BuildParametrisation_FJ()

void EdbShowerP::BuildParametrisation_FJ ( )

--— IMPORTANT:: these areopen cut values for best combifinding of pair BT deltaR/Theta values --— IMPORTANT:: then you do NOT necessarily get back your values which you put in durign --— IMPORTANT:: your shower reconstruction cone ( deltaR/Theta cutvalues could be NO cutvalues --— IMPORTANT:: for some reconstruction algorithms for example, but we wanna have these values anyway. In Any Case: Frederics Cut looks only for best min_shower_deltar so we do also.

1236 {
1237  Log(3,"EdbShowerP::BuildParametrisation_FJ()","EdbShowerP::BuildParametrisation_FJ()");
1238 
1239  // This parametrisation consists of these variables:
1240  // 0) Axis TanTheta
1241  // 1) NBT
1242  // 2) BT_deltaR_mean
1243  // 3) BT_deltaR_rms
1244  // 4) BT_deltaT_mean
1245  // 5) BT_deltaT_rms
1246  // 6) longprofile[0]=histo_longprofile->GetBinContent(1) // number of basetracks in the SAME plate as the Initiator basetrack.
1247  // 7) longprofile[1]=histo_longprofile->GetBinContent(2)
1248  // ...
1249  // 5+Npl()) longprofile[Npl()-1]=histo_longprofile->GetBinContent(Npl()) // number of basetracks in the LAST plate of the reconstructed shower.
1250  //
1251 
1252 
1253  //=======================================================================================
1254  //==C== DUMMY routine to get the values deltarb and deltathetab filled:
1255  //==C== necessary since its an OLD relict from OLD times where this was saved only
1256  //==C== as ROOT TTree ("treebranch").
1257  //=======================================================================================
1258 
1259  EdbSegP* seg;
1260  //EdbSegP* InSeg=(EdbSegP*)this->GetSegment(0);
1261  Float_t shower_xb[5000];
1262  Float_t shower_yb[5000];
1263  Float_t shower_zb[5000];
1264  Float_t shower_txb[5000];
1265  Float_t shower_tyb[5000];
1266  Float_t shower_deltathetab[5000];
1267  Float_t shower_deltarb[5000];
1268  Float_t min_shower_deltathetab=99999; // Reset
1269  Float_t min_shower_deltar=99999; // Reset
1270  Float_t extrapo_diffz=0;
1271  Float_t extrapol_x=0;
1272  Float_t extrapol_y=0;
1273 
1274  Float_t test_shower_deltathetab;
1275  Float_t test_shower_deltar;
1276  Float_t test_shower_deltax;
1277  Float_t test_shower_deltay;
1278 
1279  for (int ii=0; ii<N(); ii++) {
1280  seg=(EdbSegP*)this->GetSegment(ii);
1281  shower_xb[ii]=seg->X();
1282  shower_yb[ii]=seg->Y();
1283  shower_txb[ii]=seg->TX();
1284  shower_tyb[ii]=seg->TY();
1285  shower_zb[ii]=seg->Z();
1286  shower_deltathetab[ii]=0.5;
1287  shower_deltarb[ii]=200;
1288  }
1289 
1290  //-------------------------------------
1291  for (int ii=0; ii<N(); ii++) {
1292  seg=(EdbSegP*)this->GetSegment(ii);
1293  if (gEDBDEBUGLEVEL>2) {
1294  cout << "====== --- DOING " << ii << endl;
1295  seg->PrintNice();
1296  }
1297  //-------------------------------------
1298  // InBT:
1299  if (ii==0) {
1300  shower_deltathetab[ii]=0.5;
1301  shower_deltarb[ii]=200;
1302  }
1303  // All other BTs:
1304  if (ii>0) {
1305 
1306  // PUT HERE: calculation routine for shower_deltathetab, shower_deltarb
1307  // Exrapolate the BT [ii] to the position [jj] and then calc the
1308  // position and slope differences for the best matching next segment.
1309  // For the backward extrapolation of the shower_deltathetab and shower_deltarb
1310  // calulation for BaseTrack(ii), Basetrack(jj)->Z() hast to be smaller.
1311  min_shower_deltathetab=99999; // Reset
1312  min_shower_deltar=99999; // Reset
1313 
1314  for (int jj=0; jj<N(); jj++) {
1315  if (ii==jj) continue;
1316 
1317  // since we do not know if BTs are ordered by their Z positions:
1318  // and cannot cut directly on the number in the shower entry:
1319  if (shower_zb[ii]<shower_zb[jj]) continue;
1320 
1321  extrapo_diffz=shower_zb[ii]-shower_zb[jj];
1322  if (TMath::Abs(extrapo_diffz)>4*1300+1.0) continue;
1323  //if (TMath::Abs(extrapo_diffz)>4*1350+1.0) continue; // experimental data shows that
1324  // average delta Z is about 1350 microns, instead of 1300, please check the
1325  // compability with simulated data !!! TO BE DONE !!!
1326  if (TMath::Abs(extrapo_diffz)<1.0) continue; // remove same positions.
1327 
1328  extrapol_x=shower_xb[ii]-shower_txb[ii]*extrapo_diffz; // minus, because its ii after jj.
1329  extrapol_y=shower_yb[ii]-shower_tyb[ii]*extrapo_diffz; // minus, because its ii after jj.
1330 
1331  // Delta radius we need to extrapolate.
1332  test_shower_deltax=extrapol_x;//shower_txb[ii]*(shower_zb[ii]-shower_zb[jj])+shower_xb[ii];
1333  test_shower_deltay=extrapol_y;//shower_tyb[ii]*(shower_zb[ii]-shower_zb[jj])+shower_yb[ii];
1334  test_shower_deltax=test_shower_deltax-shower_xb[jj];
1335  test_shower_deltay=test_shower_deltay-shower_yb[jj];
1336  test_shower_deltar=TMath::Sqrt(test_shower_deltax*test_shower_deltax+test_shower_deltay*test_shower_deltay);
1337 
1338  // Delta theta we do not need to extrapolate. (old version...)
1339  //test_shower_deltathetab=TMath::Sqrt(shower_txb[ii]*shower_txb[ii]+shower_tyb[ii]*shower_tyb[ii]);
1340  //test_shower_deltathetab=test_shower_deltathetab-TMath::Sqrt(shower_txb[jj]*shower_txb[jj]+shower_tyb[jj]*shower_tyb[jj]);
1341  //test_shower_deltathetab=TMath::Abs(test_shower_deltathetab);
1342  //----
1343  // As before in ShowRec this way of calculation is not equivalent as calculating
1344  // DeltaTheta domponentwise:
1345  // Code from libShower:
1346  // delta = sqrt((SX0-a->GetTXb(l2))*(SX0-a->GetTXb(l2))+((SY0-a->GetTYb(l2))*(SY0-a->GetTYb(l2))));
1347  test_shower_deltathetab=TMath::Sqrt(TMath::Power(shower_txb[ii]-shower_txb[jj],2)+TMath::Power(shower_tyb[ii]-shower_tyb[jj],2));
1348 
1349  // Check if both dr,dt match parameter criteria and then just take these values.....
1350  // Maybe a change is necessary because it is not exactly the same as in the off. algorithm:
1351  if (test_shower_deltar<1000 && test_shower_deltathetab<2.0 ) { // open cut values
1352  // Make these values equal to the one in the "official algorithm"..... 150microns and 100mrad.
1353  //if (test_shower_deltar<150 && test_shower_deltathetab<0.15 ) { // frederics cut values
1360  if (test_shower_deltar<min_shower_deltar) {
1361  min_shower_deltathetab=test_shower_deltathetab;
1362  min_shower_deltar=test_shower_deltar;
1363  shower_deltathetab[ii]=min_shower_deltathetab;
1364  shower_deltarb[ii]=min_shower_deltar;
1365  }
1366  }
1367  }
1368  }
1369  //-------------------------------------
1370 
1371  } // for (int ii=0;ii<N();ii++)
1372  //-------------------------------------
1373 
1374 
1375 
1376  if (N()==2) {
1377  // behelfsfunktion:
1378  // but this was only for same Z case...(cause not extrapolated deltar calculation)
1379  // decided to skip this
1380  // shower_deltathetab[1]=TMath::Sqrt(TMath::Power(shower_txb[0]-shower_txb[1],2)+TMath::Power(shower_tyb[0]-shower_tyb[1],2));
1381  // shower_deltarb[1]=TMath::Sqrt(TMath::Power(shower_xb[0]-shower_xb[1],2)+TMath::Power(shower_yb[0]-shower_yb[1],2));
1382  }
1383 
1384  //-------------------------------------
1385  if (gEDBDEBUGLEVEL>2) {
1386  cout << "Shower: nentries= " << N() << endl;
1387  for (int ii=0; ii<N(); ii++) {
1388  cout << "Shower: nentry= " << ii << " shower_zb[ii] = " << shower_zb[ii] << " shower_deltathetab[ii] = " << shower_deltathetab[ii] << " shower_deltarb[ii] = " << shower_deltarb[ii] <<endl;
1389  }
1390  }
1391  //-------------------------------------
1392 
1393 
1394  //=C= =====================================================================
1395  TString histname;
1396  TH1D* histo_nbtk_av;
1397  TH1D* histo_longprofile_av;
1398  TH1D* histo_transprofile_av;
1399  TH1D* histo_deltaR_mean;
1400  TH1D* histo_deltaT_mean;
1401  TH1D* histo_deltaR_rms;
1402  TH1D* histo_deltaT_rms;
1403  TH1D* histo_nbtk;
1404  TH1D* histo_longprofile;
1405  TH1D* histo_transprofile;
1406  TH1D* histo_deltaR;
1407  TH1D* histo_deltaT;
1408  // Profile starting with (arrayindex ==0): number of basetracks in the SAME plate as the Initiator basetrack.
1409  // Profile ending with (arrayindex ==56): // number of basetracks in the LAST plate of the reconstructed shower.
1410  Int_t longprofile[57];
1411 
1412  //Int_t numberofilms=Npl(); // Historical reasons why there are more names for the same variable...
1413  Int_t nbfilm=Npl(); // Historical reasons why there are more names for the same variable...
1414  // Int_t numberoffilsforlongprofile=numberofilms+1; // it is one more going from [1..nbfilm] !!!// Not used in this routine.
1415 
1416  Float_t Dr[57];
1417  Float_t X0[57];
1418  Float_t Y0[57];
1419  Float_t TX0,TY0;
1420  Float_t theta[57];
1421  Float_t dist;
1422  Float_t xb[5000];
1423  Float_t yb[5000];
1424  Float_t zb[5000];
1425  Float_t txb[5000];
1426  Float_t tyb[5000];
1427  Int_t nfilmb[5000];
1428  //Float_t deltathetab[5000]; // Not used in this routine.
1429  //Float_t deltarb[5000]; // Not used in this routine.
1430  Int_t sizeb=N();
1431  //Int_t nentries_withisizeb=0;
1432  //=C= =====================================================================
1433  histname="histo_nbtk_av"+TString(Form("_%d", 0));
1434  histo_nbtk_av = new TH1D(histname,"Average basetrack numbers",21,0.0,10.0);
1435  histname="histo_longprofile_av"+TString(Form("_%d", 0));
1436  histo_longprofile_av = new TH1D(histname,"Basetracks per emulsion number",57,0.0,57.0);
1437  histname="histo_transprofile_av"+TString(Form("_%d", 0));
1438  histo_transprofile_av = new TH1D(histname,"Basetracks in trans distance",8,0.0,800.0);
1439  histname="histo_deltaR_mean"+TString(Form("_%d", 0));
1440  histo_deltaR_mean = new TH1D(histname,"Mean #deltar of all BTs in one shower",100,0.0,100.0);
1441  histname="histo_deltaT_mean"+TString(Form("_%d", 0));
1442  histo_deltaT_mean = new TH1D(histname,"Mean #delta#theta of all BTs in one shower",100,0.0,0.1);
1443  histname="histo_deltaR_rms"+TString(Form("_%d", 0));
1444  histo_deltaR_rms = new TH1D(histname,"RMS #deltar of all BTs in one shower",100,0.0,100.0);
1445  histname="histo_deltaT_rms"+TString(Form("_%d", 0));
1446  histo_deltaT_rms = new TH1D(histname,"RMS #delta#theta of all BTs in one shower",100,0.0,0.1);
1447  //==C== These Histos are for each Shower Entrie filled new
1448  histname="histo_nbtk"+TString(Form("_%d", 0));
1449  histo_nbtk = new TH1D(histname,"Basetracks in the shower",50,0.0,100.0);
1450  histname="histo_longprofile"+TString(Form("_%d", 0));
1451  histo_longprofile = new TH1D(histname,"Basetracks per emulsion number",57,0.0,57.0);
1452  histname="histo_deltaR"+TString(Form("_%d", 0));
1453  histo_deltaR = new TH1D(histname,"Single #deltar of all BTs in Shower",100,0.0,150.0);
1454  histname="histo_deltaT"+TString(Form("_%d", 0));
1455  histo_deltaT = new TH1D(histname,"Single #delta#theta of all BTs in Shower",150,0.0,0.15);
1456  histname="histo_transprofile"+TString(Form("_%d", 0));
1457  histo_transprofile = new TH1D(histname,"Basetracks in trans distance",8,0.0,800.0);
1458  //=C= =====================================================================
1459  histo_nbtk_av ->Reset();
1460  histo_nbtk ->Reset();
1461  histo_longprofile_av ->Reset();
1462  histo_deltaR_mean ->Reset();
1463  histo_deltaT_mean ->Reset();
1464  histo_deltaR_rms ->Reset();
1465  histo_deltaT_rms ->Reset();
1466  histo_longprofile ->Reset();
1467  histo_deltaR ->Reset();
1468  histo_deltaT ->Reset();
1469  //=C= =====================================================================
1470  for (int id=0; id<57; id++) {
1471  theta[id]= 0;
1472  X0[id] = id*1300.*GetSegment(0)->TX() + GetSegment(0)->X();
1473  Y0[id] = id*1300.*GetSegment(0)->TY() + GetSegment(0)->Y();
1474  longprofile[id]=-1;
1475  // this is important, cause it means that where is -1 there is no BT reconstructed anymore
1476  // this is different for example to holese where N=0 , so one can distinguish!
1477  }
1478 
1479  if (gEDBDEBUGLEVEL>3) cout << "histo_longprofile->GetBinWidth() " << histo_longprofile->GetBinWidth(1) << endl;
1480  if (gEDBDEBUGLEVEL>3) cout << "histo_longprofile->GetBinCenter() " << histo_longprofile->GetBinCenter(1) << endl;
1481  if (gEDBDEBUGLEVEL>3) cout << "histo_longprofile->GetNbinsX() " << histo_longprofile->GetNbinsX() << endl;
1482 
1483  TX0 = GetSegment(0)->TX();
1484  TY0 = GetSegment(0)->TY();
1485  for (Int_t j = 0; j<57; ++j) {
1486  Dr[j] = 0.03*j*1300. +20.0;
1487  //cout << " DEBUG j= " << j << " Dr[j]= " << Dr[j] << endl;
1488  } // old relict from FJ. Do not remove. //
1489  // it represents somehow conesize......(??)
1490 
1491  //=C= =====================================================================
1492  for (Int_t ibtke = 0; ibtke < N(); ibtke++) {
1493  xb[ibtke]=GetSegment(ibtke)->X();
1494  yb[ibtke]=GetSegment(ibtke)->Y();
1495  zb[ibtke]=GetSegment(ibtke)->Z();
1496  txb[ibtke]=GetSegment(ibtke)->TX();
1497  tyb[ibtke]=GetSegment(ibtke)->TY();
1498  // abs() of filmPID with respect to filmPID of first BT, plus 1: (nfilmb(0):=1 per definition):
1499  // Of course PID() have to correctly (by ReadEdbPVrec) correctly.
1500  // Fedra should do it.
1501  nfilmb[ibtke]=TMath::Abs(GetSegment(ibtke)->PID()-GetSegment(0)->PID())+1;
1502 
1503  if (gEDBDEBUGLEVEL>2) {
1504  cout << "ibtke= " <<ibtke << " xb[ibtke]= " << xb[ibtke] << " nfilmb[ibtke]= " << nfilmb[ibtke] << endl;
1505  }
1506  }
1507  //=C= =====================================================================
1508  //=C= loop over the basetracks in the shower (boucle sur les btk)
1509  // cout << "DEBUG EdbShowerP BuildParametrisation_FJ ......... //=C= loop over the basetracks in the shower (boucle sur les btk) " << endl;
1510  for (Int_t ibtke = 0; ibtke < N(); ibtke++) {
1511  // cout << " DEBUG EdbShowerP BuildParametrisation_FJ ......... ibtke = " << ibtke << " nfilmb[ibtke] = " << nfilmb[ibtke] << " nbfilm= " << nbfilm << endl;
1512 
1513  dist = sqrt((xb[ibtke]- X0[nfilmb[ibtke]-1])*(xb[ibtke]- X0[nfilmb[ibtke]-1])+(yb[ibtke]- Y0[nfilmb[ibtke]-1])*(yb[ibtke]- Y0[nfilmb[ibtke]-1]));
1514 
1515  // inside the cone
1516  //cout << "ibtke= " <<ibtke << " dist = " << dist << " Dr[nfilmb[ibtke]-1] = " << Dr[nfilmb[ibtke]-1] << endl;
1517  //cout << " nfilmb[ibtke] = " << nfilmb[ibtke] << " nbfilm = " << nbfilm << endl;
1518 
1519  // In old times there was here an additional condition which checked the BTs for the ConeDistance.
1520  // Since at this point in buildparametrisation_FJ the shower is -already fully reconstructed -
1521  // (by either EdbShoAlgo, or ShowRec program or manual list) this intruduces an additional cut
1522  // which is not correct because conetube size is algorithm specifiv (see Version.log.txt #20052010)
1523  // Thats wy we drop it here....
1524  // if (dist<Dr[nfilmb[ibtke]-1]&&nfilmb[ibtke]<=nbfilm) { // original if line comdition
1525  if (dist>Dr[nfilmb[ibtke]-1]) {
1526  if (gEDBDEBUGLEVEL>2) {
1527  cout << " WARNING , In old times this cut (dist>Dr[nfilmb[ibtke]-1]) (had also to be fulfilled!"<<endl;
1528  cout << " For this specific shower it seems not the case....." << endl;
1529  cout << " You might want to check this shower again manualy to make sure everything is correct....." << endl;
1530  }
1531  }
1532 
1533  // DEBUG:
1534  Int_t binOfhisto_transprofile=-1;
1535  // cout << "DEBUG EdbShowerP BuildParametrisation_FJ ......... histo_transprofile ->GetEntries() = " << histo_transprofile ->GetEntries() << endl;
1536 
1537  if (nfilmb[ibtke]<=nbfilm) {
1538  // cout << "DEBUG CUTCONDITION WITHOUT THE (?_?_? WRONG ?_?_?) CONE DIST CONDITION....." << endl;
1539  // cout << yes, this additional cut is not necessary anymore, see above....
1540 
1541  histo_longprofile ->Fill(nfilmb[ibtke]);
1542  histo_longprofile_av ->Fill(nfilmb[ibtke]);
1543 
1544  Double_t DR=0; //Extrapolate the old style way:
1545  Double_t Dx=xb[ibtke]-(xb[0]+(zb[ibtke]-zb[0])*txb[0]);
1546  Double_t Dy=yb[ibtke]-(yb[0]+(zb[ibtke]-zb[0])*tyb[0]);
1547  DR=TMath::Sqrt(Dx*Dx+Dy*Dy);
1548 
1549  histo_transprofile_av->Fill(DR);
1550  binOfhisto_transprofile= histo_transprofile->Fill(DR);
1551 
1552  // cout << "DEBUG EdbShowerP BuildParametrisation_FJ ......... Histotransprofile: Filled the bin " << binOfhisto_transprofile << " with the value DR= " << DR << endl;
1553 
1554  theta[nfilmb[ibtke]]+= (TX0-txb[ibtke])*(TX0-txb[ibtke])+(TY0-tyb[ibtke])*(TY0-tyb[ibtke]);
1555  if (ibtke>0&&nfilmb[ibtke]<=nbfilm) {
1556  // histo_deltaR ->Fill(deltarb[ibtke]);
1557  // histo_deltaT ->Fill(deltathetab[ibtke]);
1558  // uses shower_deltarb,shower_deltathetab just calculated in dummy routine above.
1559  // The first BT is NOT used for this filling since the extrapolated values of
1560  // shower_deltarb and shower_deltathetab are set manually to 0.5 and 200, due to
1561  // historical reasons (these variables com from the e/pi separation stuff).
1562  histo_deltaR ->Fill(shower_deltarb[ibtke]);
1563  histo_deltaT ->Fill(shower_deltathetab[ibtke]);
1564  }
1565  }
1566  }//==C== END OF loop over the basetracks in the shower
1567  //cout <<"---------------------------------------"<<endl;
1568  //=======================================================================================
1569  //==C== Fill NumberBT Histogram for all showers:
1570  histo_nbtk ->Fill(sizeb);
1571  histo_nbtk_av ->Fill(sizeb);
1572  //==C== Fill dR,dT Mean and RMS Histos for all showers:
1573  histo_deltaR_mean ->Fill(histo_deltaR->GetMean());
1574  histo_deltaT_mean ->Fill(histo_deltaT->GetMean());
1575  histo_deltaR_rms ->Fill(histo_deltaR->GetRMS());
1576  histo_deltaT_rms ->Fill(histo_deltaT->GetRMS());
1577  //=======================================================================================
1578 
1579  // Fill the longprofile array: (NEW VERSION (arrayindex 0 is same plate as Initiator BT))
1580  for (Int_t i=1; i<=nbfilm; ++i) {
1581  // longprofile[i-1] = histo_longprofile->GetBinContent(i); /// OLD VERSION for (Int_t i=1; i<=nbfilm+1; ++i)
1582  longprofile[i-1] = histo_longprofile->GetBinContent(i+1); // NEW VERSION (arrayindex 0 is same plate as Initiator BT)
1583  //test+=longprofile[i-1] ;
1584  if (gEDBDEBUGLEVEL>2) {
1585  cout << "i= " << i << " longprofile[i-1] "<< longprofile[i-1] << " histo_longprofile->GetBinContent(i) " << histo_longprofile->GetBinContent(i)<< endl;
1586  }
1587  //
1588  }
1589 
1590 
1591  //----------------------------------------------------------------------------------------
1592  // PrintSegments();
1593  Log(3,"EdbShowerP::BuildParametrisation_AS()","EdbShowerP::BuildParametrisation_AS()");
1594 
1595  // EdbSegP* seg0=(EdbSegP*)GetSegment(0)->Clone();
1596  EdbSegP* seg0=GetSegment(0);
1597  Float_t zorig=seg0->Z();
1598  // seg0->PrintNice();
1599 
1600  EdbVertex* helperVertex = new EdbVertex();
1601  helperVertex->SetXYZ(seg0->X(),seg0->Y(),seg0->Z());
1602  // helperVertex->Print();
1603 
1604  Float_t TransDist,LongDist,TotalDist=0;
1605  Float_t Point[3];
1606  Float_t LineStart[3];
1607  Float_t LineEnd[3];
1608  EdbSegP* InBT = seg0;
1609 
1610  LineStart[0]=InBT->X();
1611  LineStart[1]=InBT->Y();
1612  LineStart[2]=InBT->Z();
1613  EdbSegP* InBTProp = seg0;
1614  InBTProp->PropagateTo(zorig+10000.0);
1615  LineEnd[0]=InBTProp->X();
1616  LineEnd[1]=InBTProp->Y();
1617  LineEnd[2]=InBTProp->Z();
1618  InBTProp->PropagateTo(zorig);
1619 
1620  Double_t edIP[50];
1621  Double_t edMin[50];
1622  Double_t edRLong[50];
1623  Double_t edRTrans[50];
1624  Double_t edeltarb[50];
1625  Double_t edeltathetab[50];
1626 
1627  Int_t Nmax=TMath::Min(N(),50); // take only the first 50 segments for this parametrisation:
1628  for (int i=0; i<50; ++i) {
1629  ePara_AS.edIP[i]=0;
1630  ePara_AS.edMin[i]=0;
1631  ePara_AS.edRLong[i]=0;
1632  ePara_AS.edRTrans[i]=0;
1633  ePara_AS.edeltarb[i]=0;
1634  ePara_AS.edeltathetab[i]=0;
1635  }
1636  ePara_AS.nseg=N();
1637 
1638  // First Segment we dont need to calculate by definition (all values are zero anyway).
1639  for (Int_t j=1; j<Nmax; ++j) {
1640  // cout << "j= " << j << endl;
1641  EdbSegP* seg=GetSegment(j);
1642  // cout << "seg= " << seg << endl;
1643  // cout << "now printnice" << endl;
1644  // seg->PrintNice();
1645 
1646  LongDist=0;
1647  TransDist=0;
1648  TotalDist=0;
1649  EdbSegP* TestBT = seg;
1650  Point[0]=TestBT->X();
1651  Point[1]=TestBT->Y();
1652  Point[2]=TestBT->Z();
1653  TransDist=EdbMath::DistancePointLine3(Point, LineStart,LineEnd, true);
1654  TotalDist+=(Point[0]-LineStart[0])*(Point[0]-LineStart[0]);
1655  TotalDist+=(Point[1]-LineStart[1])*(Point[1]-LineStart[1]);
1656  TotalDist+=(Point[2]-LineStart[2])*(Point[2]-LineStart[2]);
1657  TotalDist=sqrt(TotalDist);
1658  LongDist=sqrt(TotalDist*TotalDist-TransDist*TransDist);
1659 
1660  // cout << "LongDist= " << LongDist << endl;
1661 
1662  edIP[j]=CalcIP(seg,helperVertex);
1663  edMin[j]=GetdMin(seg0,seg);
1664  edRLong[j]=LongDist;
1665  edRTrans[j]=TransDist;
1666  edeltarb[j]=shower_deltarb[j];
1667  edeltathetab[j]=shower_deltathetab[j];
1668 
1669 
1670  ePara_AS.edIP[j]=edIP[j];
1671  ePara_AS.edMin[j]=edMin[j];
1672  ePara_AS.edRLong[j]=edRLong[j];
1673  ePara_AS.edRTrans[j]=edRTrans[j];
1674  ePara_AS.edeltarb[j]=edeltarb[j];
1675  ePara_AS.edeltathetab[j]=edeltathetab[j];
1676 
1677  if (gEDBDEBUGLEVEL>3) cout << j << " " << ePara_AS.edIP[j] << " " << ePara_AS.edMin[j] << " " << ePara_AS.edRLong[j] << " " << ePara_AS.edRTrans[j] << " " << ePara_AS.edeltarb[j] << " " << ePara_AS.edeltathetab[j] << endl;
1678  }
1679  // cout << "delete cloned object seg0;"<<endl;
1680  // delete cloned object seg0;
1681  // delete cloned object helperVertex;
1682  // delete seg0;
1683  delete helperVertex;
1684  eParametrisationIsDone[7]=kTRUE;
1685  Log(3,"EdbShowerP::BuildParametrisation_AS()","EdbShowerP::BuildParametrisation_AS() ...done.");
1686 
1687  // PrintParametrisation_AS();
1688  // Helper Routine for Parametrisation_AS()...done.
1689  //-------------------------------------
1690 
1691 
1692  //----------------------------------------------------------------------------------------
1693 
1694  // Now set parametrisation values:
1696  ePara_FJ.nseg=N();
1697  ePara_FJ.BT_deltaR_mean = histo_deltaR->GetMean();
1698  ePara_FJ.BT_deltaR_rms = histo_deltaR->GetRMS();
1699  ePara_FJ.BT_deltaT_mean = histo_deltaT->GetMean();
1700  ePara_FJ.BT_deltaT_rms = histo_deltaT->GetRMS();
1701  for (int ii=0; ii<57; ii++) ePara_FJ.longprofile[ii]=longprofile[ii];
1702 
1703  // Now set parametrisation values (This routine calculates also the
1704  // values for ePara_LT since it is composed of FJ para plus
1705  // transversal profile)
1707  ePara_LT.nseg=N();
1708  ePara_LT.BT_deltaR_mean = histo_deltaR->GetMean();
1709  ePara_LT.BT_deltaR_rms = histo_deltaR->GetRMS();
1710  ePara_LT.BT_deltaT_mean = histo_deltaT->GetMean();
1711  ePara_LT.BT_deltaT_rms = histo_deltaT->GetRMS();
1712  // Reminder Root Histograms: Bin "0" is the underflow bin, so start with bin 0+1:
1713  for (int ii=0; ii<8; ii++) {
1714  // cout << " ii = " << ii << " histo_transprofile->GetBinContent(ii+1) = " << histo_transprofile->GetBinContent(ii+1) << endl;
1715  ePara_LT.transprofile[ii]=histo_transprofile->GetBinContent(ii+1);
1716  }
1717  for (int ii=0; ii<57; ii++) ePara_LT.longprofile[ii]=longprofile[ii];
1718 
1719 
1720 
1721  // Now set parametrisation values (This routine calculates also the
1722  // values for ePara_JC since it is composed of FJ and JC)
1724  ePara_JC.nseg=N();
1725  ePara_JC.BT_deltaR_mean = histo_deltaR->GetMean();
1726  ePara_JC.BT_deltaR_rms = histo_deltaR->GetRMS();
1727  ePara_JC.BT_deltaT_mean = histo_deltaT->GetMean();
1728  ePara_JC.BT_deltaT_rms = histo_deltaT->GetRMS();
1729  for (int ii=0; ii<57; ii++) ePara_JC.longprofile[ii]=longprofile[ii];
1730 
1731 
1732 
1733  // Delete Histograms (on heap):
1734  delete histo_nbtk_av;
1735  delete histo_longprofile_av;
1736  delete histo_transprofile_av;
1737  delete histo_deltaR_mean;
1738  delete histo_deltaT_mean;
1739  delete histo_deltaR_rms;
1740  delete histo_deltaT_rms;
1741  delete histo_nbtk;
1742  delete histo_longprofile;
1743  delete histo_transprofile;
1744  delete histo_deltaR;
1745  delete histo_deltaT;
1746 
1747  eParametrisationIsDone[0]=kTRUE;
1748  eParametrisationIsDone[1]=kTRUE;
1749  eParametrisationIsDone[7]=kTRUE;
1750 
1751  Log(3,"EdbShowerP::BuildParametrisation_FJ()","EdbShowerP::BuildParametrisation_FJ() ...done.");
1752  Log(3,"EdbShowerP::BuildParametrisation_LT()","EdbShowerP::BuildParametrisation_LT() ...done.");
1753  Log(3,"EdbShowerP::BuildParametrisation_AS()","EdbShowerP::BuildParametrisation_AS() ...done.");
1754  return;
1755 }
Float_t shower_yb[5000]
Definition: ShowRec.h:374
Float_t shower_tyb[5000]
Definition: ShowRec.h:377
Float_t shower_deltathetab[5000]
Definition: ShowRec.h:379
Float_t shower_zb[5000]
Definition: ShowRec.h:375
Float_t shower_deltarb[5000]
Definition: ShowRec.h:378
Float_t shower_xb[5000]
Definition: ShowRec.h:373
Float_t shower_txb[5000]
Definition: ShowRec.h:376
int sizeb
Definition: check_shower.C:38
static double DistancePointLine3(float Point[3], float LineStart[3], float LineEnd[3], bool inside)
Definition: EdbMath.cxx:61
void PropagateTo(float z)
Definition: EdbSegP.cxx:292
void PrintNice() const
Definition: EdbSegP.cxx:418
Float_t eShowerAxisAngle
Definition: EdbShowerP.h:93
Para_FJ ePara_FJ
Definition: EdbShowerP.h:349
Double_t GetdMin(EdbSegP *seg1, EdbSegP *seg2)
Definition: EdbShowerP.cxx:2719
Double_t CalcIP(EdbSegP *, EdbVertex *)
Definition: EdbShowerP.cxx:2761
Para_AS ePara_AS
Definition: EdbShowerP.h:356
Para_JC ePara_JC
Definition: EdbShowerP.h:352
Para_LT ePara_LT
Definition: EdbShowerP.h:350
Definition: EdbVertex.h:68
void SetXYZ(float x, float y, float z)
Definition: EdbVertex.h:157
float X0
Definition: emthickness.cpp:69
float Y0
Definition: emthickness.cpp:70
UInt_t id
Definition: tlg2pattern.C:118
Double_t edeltarb[50]
Definition: EdbShowerP.h:243
Int_t nseg
Definition: EdbShowerP.h:238
Double_t edeltathetab[50]
Definition: EdbShowerP.h:244
Double_t edIP[50]
Definition: EdbShowerP.h:239
Double_t edMin[50]
Definition: EdbShowerP.h:240
Double_t edRTrans[50]
Definition: EdbShowerP.h:242
Double_t edRLong[50]
Definition: EdbShowerP.h:241
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:150
Int_t nseg
Definition: EdbShowerP.h:146
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:148
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:147
Int_t longprofile[57]
Definition: EdbShowerP.h:151
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:145
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:149
Int_t nseg
Definition: EdbShowerP.h:184
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:194
Int_t longprofile[57]
Definition: EdbShowerP.h:196
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:195
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:193
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:183
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:192
Float_t BT_deltaR_rms
Definition: EdbShowerP.h:161
Int_t longprofile[57]
Definition: EdbShowerP.h:165
Float_t BT_deltaR_mean
Definition: EdbShowerP.h:160
Int_t nseg
Definition: EdbShowerP.h:159
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:158
Float_t BT_deltaT_rms
Definition: EdbShowerP.h:163
Int_t transprofile[8]
Definition: EdbShowerP.h:164
Float_t BT_deltaT_mean
Definition: EdbShowerP.h:162

◆ BuildParametrisation_JC()

void EdbShowerP::BuildParametrisation_JC ( )
2030 {
2031 
2032  Log(3,"EdbShowerP::BuildParametrisation_JC()","EdbShowerP::BuildParametrisation_JC()");
2033  // Since this Parametrisation inherits from _FJ and from _JC we execute
2034  // BuildParametrisation_FJ and BuildParametrisation_YC then it is automatically done!
2037  eParametrisationIsDone[3]=kTRUE;
2038  Log(3,"EdbShowerP::BuildParametrisation_JC()","EdbShowerP::BuildParametrisation_JC() ...done.");
2039 
2040  return;
2041 }

◆ BuildParametrisation_LT()

void EdbShowerP::BuildParametrisation_LT ( )
1762 {
1763  Log(3,"EdbShowerP::BuildParametrisation_LT()","EdbShowerP::BuildParametrisation_LT()");
1764  // Since this Parametrisation inherits from _FJ we execute BuildParametrisation_FJ
1765  // then it is automatically done!
1767  eParametrisationIsDone[1]=kTRUE;
1768  Log(3,"EdbShowerP::BuildParametrisation_LT()","EdbShowerP::BuildParametrisation_LT() ...done.");
1769  return;
1770 }

◆ BuildParametrisation_PP()

void EdbShowerP::BuildParametrisation_PP ( )
2146 {
2147  Log(3,"EdbShowerP::BuildParametrisation_PP()","EdbShowerP::BuildParametrisation_PP()");
2148  cout << "EdbShowerP::BuildParametrisation_PP()"<< endl;
2149  cout << "EdbShowerP::BuildParametrisation_PP().....THIS IS STILL IN EXPERIMENTAL STATUS....."<< endl;
2150 
2151  // This parametrisation consists of these variables:
2152  // 0) Axis TanTheta
2153  // 1) NBT
2154  // 2) OpeningAngle of FIRST BT pair in Z (and in same plate) (this is assumed to be the ePlus eMinus pair);
2155  // 3) OpeningDist of FIRST BT pair in Z (and in same plate) (this is assumed to be the ePlus eMinus pair);
2156 
2157  // What if at first Z position there is only one BT ? Then we go down the plates until we find a pair...
2158  // (temporary solution for now.., later: check mathichg BT over different plates....)
2159 
2161  ePara_PP.nseg=N();
2162  // See CalcOpenAngle() how to calculate the values...
2166  // Variable to tell if BT Pair is good related to a vertex. Can only be calculated for a given vertex.
2167  ePara_PP.ePairChi2=0;
2168 
2169  eParametrisationIsDone[6]=kTRUE;
2170  Log(3,"EdbShowerP::BuildParametrisation_PP()","EdbShowerP::BuildParametrisation_PP() NOT YET INCLUDED FINALLY!!!!");
2171 
2172  return;
2173 }
Float_t CalcOpenAngle(Int_t type)
Definition: EdbShowerP.cxx:853
Para_PP ePara_PP
Definition: EdbShowerP.h:355
Float_t ePairOpeningAngle
Definition: EdbShowerP.h:228
Int_t nseg
Definition: EdbShowerP.h:227
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:226
Float_t ePairChi2
Definition: EdbShowerP.h:231
Float_t ePairOpeningDist_dMin
Definition: EdbShowerP.h:229
Float_t ePairOpeningDist_dR
Definition: EdbShowerP.h:230

◆ BuildParametrisation_SE()

void EdbShowerP::BuildParametrisation_SE ( )
2193 {
2194  Log(3,"EdbShowerP::BuildParametrisation_SE()","EdbShowerP::BuildParametrisation_SE()");
2195 
2196  // This parametrisation consists of these variables:
2197  // 0) Axis TanTheta
2198  // 1) NBT
2199  // 2) NPL
2200  // 3) Efficiency At Axis TanTheta (if given anyway. since it can not be measured from
2201  // the shower directly we have to find another method.)
2202 
2203  // Now set parametrisation values:
2205  ePara_SE.nseg=N();
2206  ePara_SE.npl=Npl();
2208 
2209  eParametrisationIsDone[8]=kTRUE;
2210  Log(3,"EdbShowerP::BuildParametrisation_SE()","EdbShowerP::BuildParametrisation_SE() ...done.");
2211 }
Para_SE ePara_SE
Definition: EdbShowerP.h:357
Int_t nseg
Definition: EdbShowerP.h:251
Float_t efficiencyAtShowerAxisAngle
Definition: EdbShowerP.h:253
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:250
Int_t npl
Definition: EdbShowerP.h:252

◆ BuildParametrisation_XX()

void EdbShowerP::BuildParametrisation_XX ( )
2047 {
2048  Log(3,"EdbShowerP::BuildParametrisation_XX()","EdbShowerP::BuildParametrisation_XX()");
2049 
2050  // This parametrisation consists of these variables:
2051  // 0) Axis TanTheta
2052  // 1) NBT
2053  // 2) Mean of eProfileLongitudinal
2054  // 3) RMS of eProfileLongitudinal
2055  // 4) Maximum of eProfileLongitudinal
2056  // 5) Mean of eProfileTransversal
2057  // 6) RMS of eProfileTransversal
2058  // 7) Maximum of eProfileTransversal
2059 
2060  // 8) LastFilled BinCenter of eProfileLongitudinal
2061  // 9) LastFilled BinCenter of eProfileTransversal
2062 
2063 
2065  ePara_XX.nseg=N();
2066 
2069 
2072 
2073  // Necessary because the histograms are listed with Z values,
2074  // but GetMaximum returns the bin in where the maximum occurs:
2075 
2076  // Nota bene: if there is no clear maximum (i.e. all bins have same
2077  // content, then the first filled bin is returned. This maybe we dont
2078  // wanna have....in this case we take the mean bin.
2079  // No.. pretty useless since continous variables and binary variables
2080  // are mixed. We stick rather to the normal definition. of MaximumBin
2081  //
2082  //
2083  int maxbin;
2084 
2085  maxbin=eProfileLongitudinal->GetMaximumBin();
2086  ePara_XX.Max_ProfileLongitudinal=(Float_t)eProfileLongitudinal->GetBinCenter(maxbin);
2087  // if (maxbin==1) ePara_XX.Max_ProfileLongitudinal=eProfileLongitudinal->GetMean();
2088 
2089  maxbin=eProfileTransversal->GetMaximumBin();
2090  ePara_XX.Max_ProfileTransversal=(Float_t)eProfileTransversal->GetBinCenter(maxbin);
2091  // if (maxbin==1) ePara_XX.Max_ProfileTransversal=eProfileTransversal->GetMean();
2092 
2094  ePara_XX.Last_ProfileLongitudinal=(Float_t)eProfileLongitudinal->GetBinCenter(maxbin);
2096  ePara_XX.Last_ProfileTransversal=(Float_t)eProfileTransversal->GetBinCenter(maxbin);
2097 
2098  eParametrisationIsDone[4]=kTRUE;
2099  Log(3,"EdbShowerP::BuildParametrisation_XX()","EdbShowerP::BuildParametrisation_XX() ...done.");
2100  return;
2101 }
Int_t GetLastFilledBin(TH1 *hist)
Definition: EdbShowerP.cxx:2801
Para_XX ePara_XX
Definition: EdbShowerP.h:353
Float_t Max_ProfileLongitudinal
Definition: EdbShowerP.h:206
Float_t Last_ProfileTransversal
Definition: EdbShowerP.h:211
Int_t nseg
Definition: EdbShowerP.h:203
Float_t Last_ProfileLongitudinal
Definition: EdbShowerP.h:210
Float_t Max_ProfileTransversal
Definition: EdbShowerP.h:209
Float_t RMS_ProfileLongitudinal
Definition: EdbShowerP.h:205
Float_t Mean_ProfileLongitudinal
Definition: EdbShowerP.h:204
Float_t RMS_ProfileTransversal
Definition: EdbShowerP.h:208
Float_t Mean_ProfileTransversal
Definition: EdbShowerP.h:207
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:202

◆ BuildParametrisation_YC()

void EdbShowerP::BuildParametrisation_YC ( )
1776 {
1777  Log(3,"EdbShowerP::BuildParametrisation_YC()","EdbShowerP::BuildParametrisation_YC()");
1778 
1779  // This parametrisation consists of these variables:
1780  // 0) Axis TanTheta
1781  // 1) NBT
1782  // 2) C1...
1783  // 3) a1
1784  // 4) alphacalc
1785  // 5) nmaxcalc
1786  // The code for the parametrisation is (mostly) copied verbatim from YC (Yvan Caffari).
1787  // For the calculation we refer to his PhD thesis...
1788 
1789  // Copy variables used normally to local ones:
1790  int sizeb = N();
1791  int nbfilm = Npl();
1792 
1793  Float_t xb[5000];
1794  Float_t yb[5000];
1795  Float_t zb[5000];
1796  Float_t txb[5000];
1797  Float_t tyb[5000];
1798 
1799  for (int k=0; k<sizeb; k++) {
1800  xb[k] =GetSegment(k)->X();
1801  yb[k] =GetSegment(k)->Y();
1802  zb[k] =GetSegment(k)->Z();
1803  txb[k] =GetSegment(k)->TX();
1804  tyb[k] =GetSegment(k)->TY();
1805  }
1806 
1807  // nfilmb[] index ranging from 0..nseg-1; eNBTPlate[] index ranging from 0..56 (plates)
1808  // Now:: it is totally reversed:
1809  // index of nfilmb[] is segment number returning plate where segment [] is
1810  // index of nfilmb[] is number of how many segments in plate [].
1811  // Note that here "int nfilmb[9999]" is a internal variable and not kept later.
1812 
1813  int nfilmb[9999];
1814  nfilmb[0]=0;
1815 
1816  Log(4,"EdbShowerP::BuildParametrisation_YC()","Fill correctly nfilmb[k].");
1817 
1818  // So fill correctly:
1819  for (int k=0; k<sizeb; k++) {
1820  //GetSegment(k)->PrintNice();
1821  // cout << "GetSegment(k)->PID() GetSegment(0)->PID() " << GetSegment(k)->PID() << " " << GetSegment(0)->PID() << endl;
1822  nfilmb[k]=TMath::Abs(GetSegment(k)->PID()-GetSegment(0)->PID())+1;
1823  // cout << k << " " << nfilmb[k] << " " << GetSegment(k)->PID()-GetSegment(0)->PID() << endl;
1824  }
1825 
1826  Log(4,"EdbShowerP::BuildParametrisation_YC()","Fill correctly nfilmb[k].Done.");
1827 
1828  // Code from YC: ----------------------------------
1829  Float_t radiuslimit = 400;
1830  Float_t step = 40;
1831  Int_t itermax = Int_t(radiuslimit/step);
1832  Float_t rayonstep[100];
1833  for (int i=0; i<=itermax; i++) rayonstep[i] = step*i;
1834  //cout << "itermax = " << itermax << endl;
1835  //for (int i=0;i<=itermax;i++) cout << "rayonstep[i] = " << rayonstep[i] << endl;
1836  Float_t nbtkfilm[57];
1837  Float_t nbtkfilmtmp[57];
1838  Float_t nbtkcylinder[57];
1839  Float_t nbtkcylindertmp[57];
1840  Float_t nbtktmp=0;
1841  Float_t alphacalc[1]= {0};
1842  Float_t nmaxcalc[1]= {0};
1843  Float_t C1calc[1]= {0};
1844  Float_t a1calc[1]= {0};
1845  Int_t nbshower=0;
1846  for (int i=0; i<nbfilm; i++) {
1847  nbtkfilm[i]=0;
1848  nbtkfilmtmp[i]=0;
1849  }
1850  for (int i=0; i<=itermax; i++) {
1851  nbtkcylinder[i]=0;
1852  nbtkcylindertmp[i]=0;
1853  }
1854 
1855  Log(4,"EdbShowerP::BuildParametrisation_YC()","Internal Parametrisation Variables Reseted.");
1856 
1857  if (sizeb>0) {
1858  //---definition of shower axis // First Basetrack!
1859  Float_t xaxis=0;
1860  Float_t yaxis=0;
1861  Float_t zaxis=0;
1862  Float_t txaxis=0;
1863  Float_t tyaxis=0;
1864 
1865  // Shower Axis defined by first Basetrack
1866  // Ob defined by showergravitycenter.
1867  // not good because in average showergravitycenter is 200 microns in x,y away from the ("real") initiator basetrack
1868  // or in average 300 mrad!!
1869  xaxis = xb[0];
1870  yaxis = yb[0];
1871  zaxis = zb[0];
1872  txaxis = txb[0];
1873  tyaxis = tyb[0];
1874 
1875  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::BuildParametrisation_YC() ShowerAxis Defined by First BT: " << xaxis << " " << yaxis << " " << zaxis << " " << txaxis << " " << tyaxis << " " << endl;
1876 
1877  Bool_t UseShowerAxisCenterGravityBT=kTRUE;
1878  // UseShowerAxisCenterGravityBT=kFALSE;
1879  if (UseShowerAxisCenterGravityBT) {
1880  xaxis = eShowerAxisCenterGravityBT->X();
1881  yaxis = eShowerAxisCenterGravityBT->Y();
1882  zaxis = eShowerAxisCenterGravityBT->Z();
1883  txaxis = eShowerAxisCenterGravityBT->TX();
1884  tyaxis = eShowerAxisCenterGravityBT->TY();
1885  }
1886 
1887  for (int j=0; j<sizeb; j++) {
1888  Float_t xproj = xaxis + (zb[j]-zaxis)*txaxis;
1889  Float_t yproj = yaxis + (zb[j]-zaxis)*tyaxis;
1890  Float_t radius = TMath::Sqrt((xproj-xb[j])*(xproj-xb[j]) + (yproj-yb[j])*(yproj-yb[j]));
1891  // cout << "j radius " << j << " " << radius << endl;
1892  if (radius<=radiuslimit) {
1893  // cout << "in if(radius<=radiuslimit){ :: " << nfilmb[j] << " " << nbfilm << endl;
1894  if (nfilmb[j]<=nbfilm) {
1895  if (nfilmb[j]>nbfilm) cout<<" warning 1 "<<endl;
1896  nbtktmp++;
1897  for (Int_t k=0; k<nbfilm; k++) {
1898  //cout << "k= nfilmb[j] k+1 " << k << " "<< nfilmb[j] << " " << k+1 << endl;
1899  if (nfilmb[j]==k+1) {
1900  // cout << "increasing (k="<< k<< ") " << endl;
1901  nbtkfilm[k]=nbtkfilm[k]+1;
1902  nbtkfilmtmp[k]=nbtkfilmtmp[k]+1;
1903  // cout << "increasing result: " << nbtkfilm[k] << " " << nbtkfilmtmp[k] << endl;
1904  }
1905  //cout << "increasing result 2: " << nbtkfilm[k] << " " << nbtkfilmtmp[k] << endl;
1906  }
1907  //for (Int_t k=0; k<nbfilm; k++) cout<<" nbtkfilmtmp[k] "<< nbtkfilmtmp[k];
1908  //cout << endl;
1909  Int_t ii=0;
1910  for (int toto=0; toto<itermax+1; toto++) {
1911  if ((radius>=rayonstep[toto])&&(radius<=rayonstep[toto+1])) ii = toto;
1912  }
1913  nbtkcylindertmp[ii]++;
1914  nbtkcylinder[ii]++;
1915  }
1916  }
1917  }//loop on j
1918 
1919  // gEDBDEBUGLEVEL=4;
1920  Log(4,"EdbShowerP::BuildParametrisation_YC()","//---longitudinal profile");
1921  //---longitudinal profile
1922  Double_t mean = 0;
1923  Double_t RMS = 0;
1924  Double_t a = 0;
1925  Double_t b = 0;
1926  TH1F* htmplg = new TH1F("htmplg","htmplg",29,0,29);
1927  for (int l=0; l<nbfilm; l++) {
1928  //cout <<" l= " << l << " nbtkfilmtmp[l] = " << nbtkfilmtmp[l] << endl;
1929  if (nbtkfilmtmp[l]>0) {
1930  htmplg->Fill(l+1,nbtkfilmtmp[l]);
1931  if (l>=nbfilm) cout<<" warning 2 "<<endl;
1932  }
1933  }
1934 
1935  mean = htmplg->GetMean();
1936  RMS = htmplg->GetRMS();
1937  // cout << "--------------------------------- htmplg->GetMean() " << htmplg->GetMean() << endl;
1938  // cout << "--------------------------------- htmplg->GetRMS() " << htmplg->GetRMS() << endl;
1939 
1940  if ((RMS!=0)&&(mean!=0)) {
1941  a = (mean*mean)/(RMS*RMS);
1942  b = mean/(RMS*RMS);
1943  } else {
1944  a=0;
1945  b=0;
1946  }
1947  Double_t numerateur = 0;
1948  Double_t denominateur = 0;
1949  if ((a!=0)&&(b!=0)) {
1950  for (int m=0; m<nbfilm; m++) {
1951  if (m>=nbfilm) cout<<" warning 3 "<<endl;
1952  if (nbtkfilmtmp[m]>0) {
1953  numerateur += TMath::Power(b*(m+1),a-1)*TMath::Exp(-b*(m+1));
1954  denominateur += (b*TMath::Power(b*(m+1),2*(a-1))*TMath::Exp(-2*b*(m+1)))/(TMath::Gamma(a)*(nbtkfilmtmp[m]));
1955  }
1956  }
1957  }
1958  if ((denominateur!=0)||(a!=0)||(b!=0)) {
1959  alphacalc[nbshower] = 1.4*numerateur/(denominateur);
1960  nmaxcalc[nbshower] = (a-1)/b;
1961  } else {
1962  alphacalc[nbshower] = 0;
1963  nmaxcalc[nbshower] = 0;
1964  }
1965 
1966  // Sometimes alpha is NotANumber nan and therefore we set by hand the alpha to zero
1967  // (FWM, 10082009)
1968  if ( isnan(alphacalc[nbshower]) ) alphacalc[nbshower]=0.0;
1969 
1970 
1971 
1972  Log(4,"EdbShowerP::BuildParametrisation_YC()","//---transversal profile");
1973  //---transversal profile
1974  TH1F*htmptr = new TH1F("htmptr","htmptr",(itermax+1),0,(itermax+1)*step);
1975  for (int n=0; n<itermax; n++) {
1976  if (nbtkcylindertmp[n]!=0) {
1977  htmptr->Fill((n+1)*step,nbtkcylindertmp[n]);
1978  }
1979  }
1980  Double_t mu = htmptr->GetMean();
1981  Double_t sigma = htmptr->GetRMS();
1982 
1983  if (((sigma*sigma+mu*mu)-step*mu)!=0) {
1984  a1calc[nbshower] = TMath::Log( (step*mu+(sigma*sigma+mu*mu)) / ((sigma*sigma+mu*mu)-step*mu) )/(step);
1985  Double_t alpha1 = TMath::Exp(a1calc[nbshower]*step);
1986  C1calc[nbshower] = (nbtktmp)*(alpha1-1);
1987  }
1988  else {
1989  C1calc[nbshower] = 0;
1990  a1calc[nbshower] = 0;
1991  }
1992 
1993  for (int k1tmp=0; k1tmp<nbfilm; k1tmp++) nbtkfilmtmp[k1tmp] = 0;
1994  for (int k2tmp=0; k2tmp<itermax; k2tmp++) nbtkcylindertmp[k2tmp] = 0;
1995  nbtktmp=0;
1996 
1997  delete htmplg;
1998  htmplg=0;
1999  delete htmptr;
2000  htmptr=0;
2001 
2002  } //if(sizeb)
2003 
2004  // Now set parametrisation values:
2006  ePara_YC.nseg=N();
2007  ePara_YC.C1 = C1calc[nbshower];
2008  ePara_YC.a1 = a1calc[nbshower];
2009  ePara_YC.alpha = alphacalc[nbshower];
2010  ePara_YC.nmax = nmaxcalc[nbshower];
2011 
2012  // Now set parametrisation values (This routine calculates also the
2013  // values for ePara_JC since it is composed of FJ and JC)
2015  ePara_JC.nseg=N();
2016  ePara_JC.C1 = C1calc[nbshower];
2017  ePara_JC.a1 = a1calc[nbshower];
2018  ePara_JC.alpha = alphacalc[nbshower];
2019  ePara_JC.nmax = nmaxcalc[nbshower];
2020 
2021  eParametrisationIsDone[2]=kTRUE;
2022  Log(3,"EdbShowerP::BuildParametrisation_YC()","EdbShowerP::BuildParametrisation_YC() ...done.");
2023  return;
2024 }
void a()
Definition: check_aligned.C:59
Para_YC ePara_YC
Definition: EdbShowerP.h:351
Float_t nmax
Definition: EdbShowerP.h:188
Float_t alpha
Definition: EdbShowerP.h:187
Float_t C1
Definition: EdbShowerP.h:185
Float_t a1
Definition: EdbShowerP.h:186
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:171
Float_t C1
Definition: EdbShowerP.h:173
Float_t alpha
Definition: EdbShowerP.h:175
Int_t nseg
Definition: EdbShowerP.h:172
Float_t a1
Definition: EdbShowerP.h:174
Float_t nmax
Definition: EdbShowerP.h:176

◆ BuildParametrisation_YY()

void EdbShowerP::BuildParametrisation_YY ( )
2107 {
2108  Log(3,"EdbShowerP::BuildParametrisation_YY()","EdbShowerP::BuildParametrisation_YY()");
2109 
2110  //PrintBasics();
2111 
2112  // This parametrisation consists of these variables:
2113  // 0) Axis TanTheta
2114  // 1) NBT
2115  // 2) eProfileTransversal[0]->BinContent(Bin1);
2116  // 3) eProfileTransversal[1]->BinContent(Bin2);
2117  // 4) eProfileTransversal[2]->BinContent(Bin3);
2118  // 5) eProfileTransversal->BinContent(Bin4);
2119  // 6) eProfileTransversal->BinContent(Bin5);
2120  // 7) eProfileTransversal->BinContent(Bin6);
2121  // 8) eProfileTransversal[6]->BinContent(Bin7);
2122  // 9) eProfileTransversal[7]->BinContent(Bin8);
2123  // 9+1) eProfileLongitudinal->BinContent(Bin1);
2124  // ...
2125  // 9+56) eProfileLongitudinal->BinContent(Bin56);
2126 
2128  ePara_YY.nseg=N();
2129  for (int i=0; i<8; i++) ePara_YY.ProfileTransversalBincontent[i] = (int)eProfileTransversal->GetBinContent(i+1);
2130  for (int i=0; i<57; i++) ePara_YY.ProfileLongitudinalBincontent[i] = (int)eProfileLongitudinal->GetBinContent(i+1);
2131  // Remember, bin(0) is Overflow bin.
2132 
2133  // cout << eProfileLongitudinal->GetBinCenter(1) << endl;
2134  // cout << eProfileLongitudinal->GetBinWidth(1) << endl;
2135 
2136  eParametrisationIsDone[5]=kTRUE;
2137  Log(3,"EdbShowerP::BuildParametrisation_YY()","EdbShowerP::BuildParametrisation_YY() ...done.");
2138  return;
2139 }
Para_YY ePara_YY
Definition: EdbShowerP.h:354
Int_t ProfileLongitudinalBincontent[57]
Definition: EdbShowerP.h:219
Float_t ShowerAxisAngle
Definition: EdbShowerP.h:217
Int_t ProfileTransversalBincontent[8]
Definition: EdbShowerP.h:220
Int_t nseg
Definition: EdbShowerP.h:218

◆ BuildPlateProfile()

void EdbShowerP::BuildPlateProfile ( )
564 {
565  Log(3,"EdbShowerP::BuildPlateProfile()","BuildPlateProfile()");
566  if (gEDBDEBUGLEVEL>3) {
567  cout << "EdbShowerP::BuildPlateProfile()" << endl;
568  }
569 
570  // ReInit Values:
571  eN0=0;
572  for (int i=0; i<57; i++) {
573  eNBTPlate[i]=0;
574  eNBTMCPlate[i]=0;
575  }
576 
577  EdbSegP* InBT = this->GetSegment(0);
578  int nr;
579  for (int i=0; i<eNBT; i++) {
580  EdbSegP* TestBT = this->GetSegment(i);
581  nr=TMath::Abs( InBT->PID()-TestBT->PID() );
582  eNBTPlate[nr]=eNBTPlate[nr]+1;
583  if (TestBT->MCEvt()==InBT->MCEvt()) eNBTMCPlate[nr]=eNBTMCPlate[nr]+1;
584  }
585 
586  // Now the necesseary plate arrays are filled then npl and n0 can be build:
587  BuildNplN0();
588 
591 
592  Log(3,"EdbShowerP::BuildPlateProfile()","BuildPlateProfile()...done.");
593  return;
594 }
Int_t eNBTMCPlate[57]
Definition: EdbShowerP.h:75
Float_t GetSegmentFirstZ() const
Definition: EdbShowerP.h:439
Float_t eLastZ
Definition: EdbShowerP.h:55
Float_t GetSegmentLastZ() const
Definition: EdbShowerP.h:442
void BuildNplN0()
Definition: EdbShowerP.cxx:416
Float_t eFirstZ
Definition: EdbShowerP.h:54

◆ BuildProfiles()

void EdbShowerP::BuildProfiles ( )
446 {
447  Log(3,"EdbShowerP::BuildProfiles()","BuildProfiles()");
448 
449  if (gEDBDEBUGLEVEL>3) {
450  cout << "EdbShowerP::BuildProfiles()" << endl;
451  cout << "EdbShowerP::Building Transversal Profile:" << endl;
452  cout << "EdbShowerP::Loop over BTs and calculate their distance w.r.t. to the InBT axis" << endl;
453  }
454  if (eNBT<=0) {
455  cout << "EdbShowerP::BuildProfiles() Empty shower. Return." << endl;
456  return;
457  }
458 
459 
460  // Need to reset Profile Histograms, otherwise they are filled more than one time,
461  // for example, if you call Update() more often than once:
462  Log(4,"EdbShowerP::BuildProfiles()","ClearProfileHistograms()");
465 
466  // Generally we build the Profile Histograms w.r.t. the ShowerAxis !
467  // Here (just locally) we choose now:
468  EdbSegP* TemporaryAxis;
470  cout << "WARNING ----- NO eShowerAxisCenterGravityBT YET !!!!! " << endl;
471  TemporaryAxis=this->GetSegmentFirst();
472  }
473  else {
474  TemporaryAxis=eShowerAxisCenterGravityBT;
475  }
476 
477  Float_t zorig=TemporaryAxis->Z();
478 
479  // eShowerAxisCenterGravityBT->PrintNice();
480  // TemporaryAxis=this->GetSegmentFirst();
481  // TemporaryAxis->PrintNice();
482 
483  // Check if first BT is unchanged:
484  //cout << "check if first BT is unchanged:" << endl;
485  //this->GetSegment(0)->PrintNice();
486 
487  Float_t TransDist=0;
488  Float_t LongDist=0;
489  Float_t TotalDist=0;
490  Float_t Point[3];
491  Float_t LineStart[3];
492  Float_t LineEnd[3];
493  // cout << "--"<<endl;
494  // EdbSegP* InBT = this->GetSegmentFirst();
495  EdbSegP* InBT = TemporaryAxis;
496  // InBT->PrintNice();
497  // cout << "--"<<endl;
498  LineStart[0]=InBT->X();
499  LineStart[1]=InBT->Y();
500  LineStart[2]=InBT->Z();
501  // EdbSegP* InBTProp = this->GetSegmentFirst();
502  EdbSegP* InBTProp = TemporaryAxis;
503  InBTProp->PropagateTo(zorig+10000.0);
504  // InBTProp->PrintNice();
505  // cout << "--"<<endl;
506  LineEnd[0]=InBTProp->X();
507  LineEnd[1]=InBTProp->Y();
508  LineEnd[2]=InBTProp->Z();
509  InBTProp->PropagateTo(zorig);
510  // Propagate back, since the address is the one of the stored Basetrack.
511  // this is only a workaround to get the axis coordinate points...
512 
513  // For the InBT, the values xxxDist are taken into account as well:
514  LongDist=0;
515  TransDist=0;
516  TotalDist=0;
517 
518  for (int i=0; i<eNBT; i++) {
519 
520  // Reset Interim calcultiion values - of course.
521  LongDist=0;
522  TransDist=0;
523  TotalDist=0;
524 
525  EdbSegP* TestBT = this->GetSegment(i);
526  Point[0]=TestBT->X();
527  Point[1]=TestBT->Y();
528  Point[2]=TestBT->Z();
529  TransDist=EdbMath::DistancePointLine3(Point, LineStart,LineEnd, true);
530  TotalDist+=(Point[0]-LineStart[0])*(Point[0]-LineStart[0]);
531  TotalDist+=(Point[1]-LineStart[1])*(Point[1]-LineStart[1]);
532  TotalDist+=(Point[2]-LineStart[2])*(Point[2]-LineStart[2]);
533  TotalDist=sqrt(TotalDist);
534  LongDist=sqrt(TotalDist*TotalDist-TransDist*TransDist);
535 
536  if (gEDBDEBUGLEVEL>3) {
537  cout << "i= "<< i<< " TotalDist (microns)= " << setw(14) << TotalDist << endl;
538  cout << "i= "<< i<< " LongDist (microns)= " << setw(14) << LongDist << endl;
539  cout << "i= "<< i<< " TransDist (microns)= " << setw(14) << TransDist << endl;
540  }
541 
542  eProfileLongitudinal->Fill(LongDist);
543  eProfileTransversal->Fill(TransDist);
544 
545  // DEBUG VERSION, Weighting Profile Histograms with the number of segments
546  // eProfileLongitudinal->Fill(LongDist,weight);
547  // eProfileTransversal->Fill(TransDist,weight);
548  }
549 
550  //cout << "eProfileLongitudinal->Integral() = " << eProfileLongitudinal->Integral() << endl;
551  //cout << "eProfileTransversal->Integral() = " << eProfileTransversal->Integral() << endl;
552 
553  // "check if first BT is unchanged:
554  //cout << "check if first BT is unchanged:" << endl;
555  //this->GetSegment(0)->PrintNice();
556 
557  Log(3,"EdbShowerP::BuildProfiles()","BuildProfiles()...done.");
558  return;
559 }
void ClearProfileLongitudinalHisto()
Definition: EdbShowerP.h:505
void ClearProfileTransversalHisto()
Definition: EdbShowerP.h:508

◆ BuildShowerAxis()

void EdbShowerP::BuildShowerAxis ( )
601 {
602  Log(3,"EdbShowerP::BuildShowerAxis()","BuildShowerAxis()");
603 
604  // Code taken from EdbMath::LFIT3 to fit line to a collection of points in spce!
605  //int EdbMath::LFIT3( float *X, float *Y, float *Z, float *W, int L,
606  //float &X0, float &Y0, float &Z0, float &TX, float &TY, float &EX, float &EY )
607  // Linear fit in 3-d case (microtrack-like)
608  // Input: X,Y,Z - coords, W -weight - arrays of the lengh >=L
609  // Note that X,Y,Z modified by function
610  // Output: X0,Y0,Z0 - center of gravity of segment
611  // TX,TY : direction tangents in respect to Z axis
612 
613  Float_t X0,Y0,Z0;
614  Float_t TX,TY;
615  Float_t EX,EY;
616  Float_t TX0,TY0;
617  // Float_t x[eNBT]; Float_t z[eNBT]; Float_t y[eNBT]; Float_t W[eNBT];
618  // Compiled with -pedantic -Wall -W -Wstrict-prototypes this gives error message: Fehler: ISO-C++ verbietet Feld »x« variabler Länge
619  // So we take it as fixed length:
620  Float_t x[5000];
621  Float_t y[5000];
622  Float_t tx[5000];
623  Float_t ty[5000];
624  Float_t z[5000];
625  Float_t W[5000];
626  Float_t sumTX=0;
627  Float_t sumTY=0;
628  Float_t sumW=0;
629 
630  // The weighting of the segments is a crucial point here, since it influences
631  // the fitting to the shower axis!
632  // We choose the weighting with distance to Initator BT. So that large scattered BTs far off
633  // do not contribute too much.
634 
635  // Attention: If the shower was ordered in such a way that this->GetSegment(0) is NOT the lowest Z in
636  // the shower, then the results will be totally crapped, since the fit starts then from the end!!!
637 
638  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::BuildShowerAxis() eNBT="<< eNBT << endl;
639  if (gEDBDEBUGLEVEL>3) PrintSegments();
640  //Print();
641 
642  for (int i=0; i<eNBT; i++) {
643  EdbSegP* TestBT = this->GetSegment(i);
644  //TestBT->PrintNice();
645  x[i]=TestBT->X();
646  y[i]=TestBT->Y();
647  z[i]=TestBT->Z();
648  tx[i]=TestBT->TX();
649  ty[i]=TestBT->TY();
650 
651  W[i]=1.0;
652  W[i]=1.0/ (TMath::Abs(z[i]-z[0])/1300.0*TMath::Abs(z[i]-z[0])/1300.0 +1.0);
653 
654  sumTX+=W[i]*TestBT->TX();
655  sumTY+=W[i]*TestBT->TY();
656  sumW+=W[i];
657  }
658 
659  for (int i=eNBT; i<5000; i++) {
660  W[i]=0;
661  x[i]=0;
662  y[i]=0;
663  z[i]=0;
664  tx[i]=0;
665  ty[i]=0;
666  }
667 
668  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::BuildShowerAxis() Resting of initial values done."<< endl;
669 
670  // For the VERY special case of only two segments at same Z position,
671  // like electron/positron pair, EdbMath::LFIT3 returns inf cause by zero division.
672  // In this case we return the average of both segments:
673  // This issue is fixed in new fedra version svn>???
674  if (eNBT==2 && z[0]==z[1]) {
675  if (gEDBDEBUGLEVEL>3) cout << "Special case of only two segments at same Z position"<<endl;
676  // cout << "Print First:" << endl;
677  // GetSegment(0)->PrintNice();
678  // cout << "Print Second:" << endl;
679  // GetSegment(1)->PrintNice();
680  X0=x[0]+(x[1]-x[0])/2.0;
681  Y0=y[0]+(y[1]-y[0])/2.0;
682  TX0=tx[0]+(tx[1]-tx[0])/2.0;
683  TY0=ty[0]+(ty[1]-ty[0])/2.0;
689  eShowerAxisAngle=TMath::Sqrt(TX0*TX0+TY0*TY0);
690  //eShowerAxisCenterGravityBT->PrintNice();
691  return;
692  }
693 
694  // Invoke fit function:
695  EdbMath::LFIT3( x,y,z,W,eNBT,X0,Y0,Z0,TX,TY,EX,EY);
696  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::BuildShowerAxis() Invoke fit function done"<< endl;
697 
698  // Normierung:
699  sumTX=sumTX/sumW;
700  sumTY=sumTY/sumW;
701 
702  // Set Z0 to first BT:
703  Z0=this->GetSegment(0)->Z();
704 
705  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::BuildShowerAxis Axis X0,Y0,Z0, TX, TY Z0" << X0 << " " << Y0 << " " << Z0 << " " << TX << " " << TY << " " << Z0 << endl;
706 
707  if (!eShowerAxisCenterGravityBT) eShowerAxisCenterGravityBT = new EdbSegP(-1,X0,Y0,sumTX,sumTY,0,0);
709  eShowerAxisAngle=TMath::Sqrt(TX*TX+TY*TY);
710 
711  // In this case, we take ShowerAxisAngle and eShowerAxisCenterGravityBT to be as the first starting BT:
712  if (isnan(eShowerAxisAngle) || isinf(eShowerAxisAngle) ) {
713  if (gEDBDEBUGLEVEL>3) {
714  if (isnan(eShowerAxisAngle)) cout << "eShowerAxisAngle==isnan() " << endl;
715  if (isinf(eShowerAxisAngle)) cout << "eShowerAxisAngle==isinf() " << endl;
716  cout << "In this case, we take ShowerAxisAngle and eShowerAxisCenterGravityBT to be as the first starting BT"<<endl;
717  cout << " Shower->N(): " << N() << endl;
718  }
722  //this->PrintSegments();
723  }
724 
725  // Set Z GenterGravity Position to InitiabtorBT Z position (otherwise the center
726  // Basetrack can be at Z in the middle of the shower)...
727  // But have to propagate since it is not correctly put at XY
728  // eShowerAxisCenterGravityBT -> SetZ(GetSegment(0)->Z());
729  // eShowerAxisCenterGravityBT->PropagateTo(GetSegment(0)->Z());
730  // eShowerAxisCenterGravityBT->SetPID(GetSegment(0)->PID());
731 
732  Log(3,"EdbShowerP::BuildShowerAxis()","BuildShowerAxis()...done.");
733  return;
734 }
static int LFIT3(float *X, float *Y, float *Z, float *W, int L, float &X0, float &Y0, float &Z0, float &TX, float &TY, float &EX, float &EY)
Definition: EdbMath.cxx:313
EdbSegP()
Definition: EdbSegP.h:50
void SetP(float p)
Definition: EdbSegP.h:130
Float_t W() const
Definition: EdbSegP.h:148
void PrintSegments()
Definition: EdbShowerP.cxx:2367
float Z0
Definition: hwinit.C:67

◆ CalcDistLongitudinal()

Double_t EdbShowerP::CalcDistLongitudinal ( EdbSegP seg0,
EdbSegP segTest 
)
2791  {
2792 
2793  return 0;
2794 }

◆ CalcDistTransversal()

Double_t EdbShowerP::CalcDistTransversal ( EdbSegP seg0,
EdbSegP segTest 
)
2796  {
2797 
2798  return 0;
2799 }

◆ CalcIP() [1/2]

Double_t EdbShowerP::CalcIP ( EdbSegP s,
double  x,
double  y,
double  z 
)
2773  {
2774  // Calculate IP between a given segment and a given x,y,z.
2775  // return the IP value.
2776  double ax = s->TX();
2777  double ay = s->TY();
2778  double bx = s->X()-ax*s->Z();
2779  double by = s->Y()-ay*s->Z();
2780  double a;
2781  double r;
2782  double xx,yy,zz;
2783  a = (ax*(x-bx)+ay*(y-by)+1.*(z-0.))/(ax*ax+ay*ay+1.);
2784  xx = bx +ax*a;
2785  yy = by +ay*a;
2786  zz = 0. +1.*a;
2787  r = sqrt((xx-x)*(xx-x)+(yy-y)*(yy-y)+(zz-z)*(zz-z));
2788  return r;
2789 }
void r(int rid=2)
Definition: test.C:201

◆ CalcIP() [2/2]

Double_t EdbShowerP::CalcIP ( EdbSegP s,
EdbVertex v 
)
2761  {
2762  // calculate IP for the selected tracks wrt the given vertex.
2763  // if the vertex is not given, use the selected vertex.
2764  if (NULL==v) {
2765  printf("select a vertex!\n");
2766  return 0;
2767  }
2768  if (gEDBDEBUGLEVEL>3) printf(" /// Calc IP w.r.t. Vertex %d %8.1lf %8.1lf %8.1lf (red vertex) ///\n",v->ID(), v->X(),v->Y(),v->Z() );
2769  double r = CalcIP(s,v->X(),v->Y(),v->Z());
2770  return r;
2771 }
Int_t ID() const
Definition: EdbVertex.h:126
Float_t X() const
Definition: EdbVertex.h:130
Float_t Z() const
Definition: EdbVertex.h:132
Float_t Y() const
Definition: EdbVertex.h:131
#define NULL
Definition: nidaqmx.h:84

◆ CalcOpenAngle()

Float_t EdbShowerP::CalcOpenAngle ( Int_t  type)
854 {
855  Log(3,"EdbShowerP::CalcOpenAngle()","CalcOpenAngle()");
856 
857  // Calculates opening angle using following assumptions and
858  // requiries:
859  // TwoByTwo Segment Pairs:
860  // a) dMin<60;
861  // b) dTheta<200;
862  // c) dZ<4000 (ca. 3plates differences)
863  // c) dZ_To_Z0<5500 (ca. 4plates differences)
864 
865  // Out of these possible options:
866  // Choose SegmentPairing which occurst at first Z position; give preference to
867  // pairings appearing at same plate
868 
869  EdbSegP* s1=0;
870  EdbSegP* s2=0;
871  Double_t tmp_dMin,tmp_dTheta;
872  Float_t tmp_minZ=0, abs_minZ=999999999;
873  Int_t tmp_diffPID=0;
874  Int_t min_diffPID=99;
875  Int_t tmp_n1=0;
876  Int_t tmp_n2=0;
877  Double_t min_dMin=0;
878  Double_t min_dTheta=0;
879  Double_t min_dR=0;
880  Float_t tmp_dR;
881  Float_t tmp_diffZ;
882  Bool_t found_for_PIDDIFF=kFALSE;
883 
884  Int_t ncombination=(N()*(N()-1))/2;
885  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::CalcOpenAngle Number of combinations to be searched: " << ncombination << endl;
886 
887  Float_t minZ=TMath::Min(GetSegmentFirstZ(),GetSegmentLastZ());
888  //cout << "GetSegmentFirstZ() " << GetSegmentFirstZ() << endl;
889  //cout << "GetSegmentLastZ() " << GetSegmentLastZ() << endl;
890 
891  for (Int_t n0=0; n0<=3; ++n0) {
892  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::CalcOpenAngle Doing PIDDIFF_" << n0 << " (found yet: " << found_for_PIDDIFF << " ) " << endl;
893 
894  abs_minZ=999999999;
895  min_diffPID=99;
896 
897  for (Int_t n1=0; n1<N()-1; ++n1) {
898  for (Int_t n2=n1+1; n2<N(); ++n2) {
899  // cout << " Combi found for n1= " << n1 << " and n2 = " << n2 << endl;
900  s1=GetSegment(n1);
901  s2=GetSegment(n2);
902 
903  tmp_minZ=TMath::Min(s1->Z(),s2->Z());
904  tmp_diffZ=TMath::Abs(s1->Z()-s2->Z());
905  tmp_diffPID=TMath::Abs(s1->PID()-s2->PID());
906 
907  if (tmp_diffPID>n0) continue;
908  if (tmp_diffZ>4000) continue;
909  if (TMath::Abs(minZ-tmp_minZ)>5500) continue;
910 
911  if (GetdMin(s1,s2)>60) continue;
912  if (GetdT(s1,s2)>0.2) continue;
913 
914  tmp_dMin=GetdMin(s1,s2);
915  tmp_dTheta=GetdT(s1,s2);
916  tmp_dR=GetdR(s1,s2);
917  // cout << " Combi found for n1= " << n1 << " and n2 = " << n2 << endl;
918  // cout << " With tmp_dMin= " << tmp_dMin << " and tmp_dTheta = " << tmp_dTheta << endl;
919 
920  if (tmp_minZ<=abs_minZ) {
921  abs_minZ=tmp_minZ;
922 
923  if (tmp_diffPID<=min_diffPID) {
924  min_diffPID=tmp_diffPID;
925 
926  tmp_n1=n1;
927  tmp_n2=n2;
928  min_dTheta=tmp_dTheta;
929  min_dMin=tmp_dMin;
930  min_dR=tmp_dR;
931 
932  found_for_PIDDIFF=kTRUE;
933  }
934  }
935  //if (tmp_minZ<=abs_minZ)
936  }
937  // for (Int_t n2=n1+1; n2<N(); ++n2)
938  }
939  //for (Int_t n1=0; n1<N()-1; ++n1)
940 
941  // Comment:
942  if (gEDBDEBUGLEVEL>3) {
943  cout << "EdbShowerP::CalcOpenAngle Best Combi found for tmp_n1= " << tmp_n1 << " and tmp_n2 = " << tmp_n2 << " having a tmp_Z of " << tmp_minZ << " min_dTheta= " << min_dTheta << " min_dMin= " << min_dMin << " min_dR= " << min_dR << " tmp_diffPID= " << tmp_diffPID << endl;
944  }
945 
946 
947  } // for (Int_t n0=0; n0<=3; ++n0) //
948 
949 
950 
951  if (type==0) {
952  return min_dTheta; // equivalent to ePairOpeningAngle in BuildParametrisation_PP()
953  }
954  else if (type==1) {
955  return min_dMin; // equivalent to ePairOpeningDist_dMin in BuildParametrisation_PP()
956  }
957  else if (type==2) {
958  return min_dR; // equivalent to ePairOpeningDist_dR in BuildParametrisation_PP()
959  }
960  else {
961  return 0;
962  }
963 
964  return 0;
965 }
Double_t GetdT(EdbSegP *seg1, EdbSegP *seg2)
Definition: EdbShowerP.cxx:2756
Double_t GetdR(EdbSegP *seg1, EdbSegP *seg2)
Definition: EdbShowerP.cxx:2714
Int_t type
Definition: testBGReduction_By_ANN.C:15
EdbSegP * s1
Definition: tlg2pattern.C:30
EdbSegP * s2
Definition: tlg2pattern.C:31

◆ CalcOpenAngleSimple()

Float_t EdbShowerP::CalcOpenAngleSimple ( )
839 {
840  Log(3,"EdbShowerP::CalcOpenAngleSimple()","CalcOpenAngleSimple()");
841  // Simply Return Angle between first two segments in the
842  // shower array:
843  if (N()<2) return 0;
844 
845  EdbSegP* s1 = GetSegment(0);
846  EdbSegP* s2 = GetSegment(1);
847 
848  return GetdT(s1,s2);
849 }

◆ CalcPurity()

void EdbShowerP::CalcPurity ( )
776 {
777  if (eNBT>0) ePurity=(Float_t)eNBTMC/(Float_t)eNBT;
778  if (gEDBDEBUGLEVEL>3) cout <<"EdbShowerP::CalcPurity(): eNBTMC=" << eNBTMC << " eNBT= " << eNBT << " ePurity=" << ePurity << endl;
779  return;
780 }
Float_t ePurity
Definition: EdbShowerP.h:79

◆ CalcShowerAngularDeviationDistribution()

void EdbShowerP::CalcShowerAngularDeviationDistribution ( )
741 {
742  Log(3,"EdbShowerP::CalcShowerAngularDeviationDistribution()","CalcShowerAngularDeviationDistribution()");
743 
744  // First check if shower axis has been built:
746 
747  // Loop over all tracks of the shower, for each one calc TX, TY - TXY_gravity center
748  Double_t deltaTX,deltaTY;
749  TH1F histDeltaTX("histDeltaTX","histDeltaTX",100,-0.5,0.5);
750  TH1F histDeltaTY("histDeltaTY","histDeltaTY",100,-0.5,0.5);
751 
752  // Loop over all tracks of the shower, for each one calc TX, TY - TXY_gravity center
753  // If eShowerAxisCenterGravityBT is first BT in shower (because fit did not work, or
754  // just two segments on same z) then the first one entry in deltaTXY is always zero
755  for (Int_t i=0; i<eNBT; ++i) {
756  deltaTX=GetSegment(i)->TX()-eShowerAxisCenterGravityBT->TX();
757  deltaTY=GetSegment(i)->TY()-eShowerAxisCenterGravityBT->TY();
758  histDeltaTX.Fill(deltaTX);
759  histDeltaTY.Fill(deltaTY);
760  }
761  // Get mean and sigma of these distributions.
762  eShowerAngularDeviationTXDistribution_mean = histDeltaTX.GetMean();
763  eShowerAngularDeviationTXDistribution_sigma = histDeltaTX.GetRMS();
764  eShowerAngularDeviationTYDistribution_mean = histDeltaTY.GetMean();
765  eShowerAngularDeviationTYDistribution_sigma = histDeltaTY.GetRMS();
766 
767  Log(3,"EdbShowerP::CalcShowerAngularDeviationDistribution()","CalcShowerAngularDeviationDistribution()...done");
768  return;
769 }
Float_t eShowerAngularDeviationTYDistribution_sigma
Definition: EdbShowerP.h:102
Float_t eShowerAngularDeviationTYDistribution_mean
Definition: EdbShowerP.h:101
Float_t eShowerAngularDeviationTXDistribution_mean
Definition: EdbShowerP.h:99
Float_t eShowerAngularDeviationTXDistribution_sigma
Definition: EdbShowerP.h:100
void BuildShowerAxis()
Definition: EdbShowerP.cxx:600

◆ CalcSphericity()

void EdbShowerP::CalcSphericity ( )
787 {
788  Log(3,"EdbShowerP::CalcSphericity()","CalcSphericity().");
789 
790  // Calculates the Sphericity of all BTs around shower axis:
791  // "Sphericity" may not have a common definition so refer to this code when
792  // describing it.
793 
794  eSphericity=0;
795  if (gEDBDEBUGLEVEL>3) this->PrintSegments();
796 
797  // 1) Get Shower Axis as TVector:
799 
800  TVector3 axisUnit=axis.Unit();
801  TVector3 TestVectorUnit;
802 
803  if (gEDBDEBUGLEVEL>3) axisUnit.Print();
804  TVector3 TestVector;
805  TVector3 SumVector;
806  TVector3 CrossVector;
807  SumVector.SetXYZ(0,0,0);
808 
809  for (int i=0; i<eNBT; i++) {
810  EdbSegP* TestBT = this->GetSegment(i);
811  TestVector.SetXYZ(TestBT->TX(),TestBT->TY(),1);
812  TestVectorUnit=TestVector.Unit();
813  SumVector+=TestVectorUnit;
814  }
815 
816  if (gEDBDEBUGLEVEL>3) {
817  cout << "EdbShowerP::CalcSphericity() SumVector" << endl;
818  SumVector.Print();
819  }
820 
821  TVector3 SumVecUnit=SumVector.Unit();
822  TVector3 SumVecUnitDotAxis=SumVecUnit.Cross(axisUnit);
823 
824  if (gEDBDEBUGLEVEL>3) {
825  cout << "EdbShowerP::CalcSphericity() Final value: Mag " << SumVector.Mag() << endl;
826  cout << "EdbShowerP::CalcSphericity() Final value: DotMag (=eSphericity) " << SumVecUnitDotAxis.Mag() << endl;
827  }
828 
829  eSphericity=SumVecUnitDotAxis.Mag();
830 
831  Log(3,"EdbShowerP::CalcSphericity()","CalcSphericity()...done.");
832  return;
833 }
Float_t eSphericity
Definition: EdbShowerP.h:82

◆ Clear()

void EdbShowerP::Clear ( )
inline
502  {
503  if (eS) eS->Clear();
504  }

◆ ClearAll()

void EdbShowerP::ClearAll ( void  )
288 {
289  cout<<"EdbShowerP::ClearAll() "<<endl;
290  Clear();
293  Set0();
294  cout<<"EdbShowerP::ClearAll() done."<<endl;
295 }
void Clear()
Definition: EdbShowerP.h:502

◆ ClearProfileLongitudinalHisto()

void EdbShowerP::ClearProfileLongitudinalHisto ( )
inline
505  {
507  }

◆ ClearProfileTransversalHisto()

void EdbShowerP::ClearProfileTransversalHisto ( )
inline
508  {
510  }

◆ Finalize()

void EdbShowerP::Finalize ( )
1027 {
1028  Log(3,"EdbShowerP::Finalize()","Finalize() Deleting Profile Histograms.");
1029  if (eProfileLongitudinal) {
1030  delete eProfileLongitudinal;
1032  }
1033  if (eProfileTransversal) {
1034  delete eProfileTransversal;
1036  }
1037  Log(3,"EdbShowerP::Finalize()","Finalize()...done.");
1038  return;
1039 }

◆ GetdMin()

Double_t EdbShowerP::GetdMin ( EdbSegP seg1,
EdbSegP seg2 
)
private
2719  {
2720  // calculate minimum distance of 2 lines.
2721  // use the data of (the selected object)->X(), Y(), Z(), TX(), TY().
2722  // means, if the selected object == segment, use the data of the segment. or it == track, the use the fitted data.
2723  // original code from Tomoko Ariga
2724  // double calc_dmin(EdbSegP *seg1, EdbSegP *seg2, double *dminz = NULL){
2725  double x1,y1,z1,ax1,ay1;
2726  double x2,y2,z2,ax2,ay2;
2727  double s1,s2,s1bunsi,s1bunbo,s2bunsi,s2bunbo;
2728  double p1x,p1y,p1z,p2x,p2y,p2z,p1p2;
2729  if (seg1->ID()==seg2->ID()&&seg1->PID()==seg2->PID()) return 0.0;
2730  x1 = seg1->X();
2731  y1 = seg1->Y();
2732  z1 = seg1->Z();
2733  ax1= seg1->TX();
2734  ay1= seg1->TY();
2735  x2 = seg2->X();
2736  y2 = seg2->Y();
2737  z2 = seg2->Z();
2738  ax2= seg2->TX();
2739  ay2= seg2->TY();
2740  s1bunsi=(ax2*ax2+ay2*ay2+1)*(ax1*(x2-x1)+ay1*(y2-y1)+z2-z1) - (ax1*ax2+ay1*ay2+1)*(ax2*(x2-x1)+ay2*(y2-y1)+z2-z1);
2741  s1bunbo=(ax1*ax1+ay1*ay1+1)*(ax2*ax2+ay2*ay2+1) - (ax1*ax2+ay1*ay2+1)*(ax1*ax2+ay1*ay2+1);
2742  s2bunsi=(ax1*ax2+ay1*ay2+1)*(ax1*(x2-x1)+ay1*(y2-y1)+z2-z1) - (ax1*ax1+ay1*ay1+1)*(ax2*(x2-x1)+ay2*(y2-y1)+z2-z1);
2743  s2bunbo=(ax1*ax1+ay1*ay1+1)*(ax2*ax2+ay2*ay2+1) - (ax1*ax2+ay1*ay2+1)*(ax1*ax2+ay1*ay2+1);
2744  s1=s1bunsi/s1bunbo;
2745  s2=s2bunsi/s2bunbo;
2746  p1x=x1+s1*ax1;
2747  p1y=y1+s1*ay1;
2748  p1z=z1+s1*1;
2749  p2x=x2+s2*ax2;
2750  p2y=y2+s2*ay2;
2751  p2z=z2+s2*1;
2752  p1p2=sqrt( (p1x-p2x)*(p1x-p2x)+(p1y-p2y)*(p1y-p2y)+(p1z-p2z)*(p1z-p2z) );
2753  return p1p2;
2754 }
Int_t ID() const
Definition: EdbSegP.h:144

◆ GetdR()

Double_t EdbShowerP::GetdR ( EdbSegP seg1,
EdbSegP seg2 
)
private
2715 {
2716  return TMath::Sqrt((seg1->X()-seg2->X())*(seg1->X()-seg2->X())+(seg1->Y()-seg2->Y())*(seg1->Y()-seg2->Y()));
2717 }

◆ GetdT()

Double_t EdbShowerP::GetdT ( EdbSegP seg1,
EdbSegP seg2 
)
private
2757 {
2758  return TMath::Sqrt((seg1->TX()-seg2->TX())*(seg1->TX()-seg2->TX())+(seg1->TY()-seg2->TY())*(seg1->TY()-seg2->TY()));
2759 }

◆ GetExtraInfoIsDone()

Bool_t EdbShowerP::GetExtraInfoIsDone ( Int_t  nr) const
inline
587  {
588  return eExtraInfoIsDone[nr];
589  }

◆ GetFirstZ()

Float_t EdbShowerP::GetFirstZ ( ) const
inline
445  {
446  return eFirstZ;
447  }

◆ GetLastFilledBin()

Int_t EdbShowerP::GetLastFilledBin ( TH1 *  hist)
private
2802 {
2803  // return last filled X bin of a histogram (leave out under/overflow bins):
2804  Int_t lastbin=1;
2805  for (Int_t i=1; i<hist->GetNbinsX()-1; ++i) {
2806  if (hist->GetBinContent(i)>0) lastbin=i;
2807  }
2808  return lastbin;
2809 }
void hist()
Definition: init.C:23

◆ GetLastZ()

Float_t EdbShowerP::GetLastZ ( ) const
inline
448  {
449  return eLastZ;
450  }

◆ GetM()

Int_t EdbShowerP::GetM ( ) const
inline
468  {
469  return M();
470  }
Float_t M() const
Definition: EdbShowerP.h:465

◆ GetMCInfo_Event()

MCInfo_Event EdbShowerP::GetMCInfo_Event ( ) const
inline
593  {
594  return eMCInfo_Event;
595  }
MCInfo_Event eMCInfo_Event
Definition: EdbShowerP.h:363

◆ GetMCInfo_PGun()

MCInfo_PGun EdbShowerP::GetMCInfo_PGun ( ) const
inline
590  {
591  return eMCInfo_PGun;
592  }
MCInfo_PGun eMCInfo_PGun
Definition: EdbShowerP.h:362

◆ GetMCInfoIsDone()

Bool_t EdbShowerP::GetMCInfoIsDone ( Int_t  nr) const
inline
584  {
585  return eMCInfoIsDone[nr];
586  }
Bool_t eMCInfoIsDone[2]
Definition: EdbShowerP.h:46

◆ GetNBT()

Int_t EdbShowerP::GetNBT ( ) const
inline
513  {
514  return eNBT;
515  }

◆ GetNBTMC()

Int_t EdbShowerP::GetNBTMC ( ) const
inline
516  {
517  return eNBTMC;
518  }

◆ GetNBTMCFlag()

Int_t EdbShowerP::GetNBTMCFlag ( Int_t  PdgArray) const
inline
519  {
520  return eNBTMCFlag[PdgArray];
521  }
Int_t eNBTMCFlag[99]
Definition: EdbShowerP.h:73

◆ GetNBTMCFlagPlate()

Int_t EdbShowerP::GetNBTMCFlagPlate ( Int_t  PIDdiff,
Int_t  PdgArray 
) const
inline
528  {
529  return eNBTMCFlagPlate[PIDdiff][PdgArray];
530  }
Int_t eNBTMCFlagPlate[57][99]
Definition: EdbShowerP.h:76

◆ GetNBTMCPlate()

Int_t EdbShowerP::GetNBTMCPlate ( Int_t  PIDdiff) const
inline
525  {
526  return eNBTMCPlate[PIDdiff];
527  }

◆ GetNBTPlate()

Int_t EdbShowerP::GetNBTPlate ( Int_t  PIDdiff) const
inline
522  {
523  return eNBTPlate[PIDdiff];
524  }

◆ GetPara_AS()

Para_AS EdbShowerP::GetPara_AS ( ) const
inline
572  {
573  return ePara_AS;
574  }

◆ GetPara_ExtraInfo()

Para_ExtraInfo EdbShowerP::GetPara_ExtraInfo ( ) const
inline
578  {
579  return ePara_ExtraInfo;
580  }

◆ GetPara_FJ()

Para_FJ EdbShowerP::GetPara_FJ ( ) const
inline
551  {
552  return ePara_FJ;
553  }

◆ GetPara_JC()

Para_JC EdbShowerP::GetPara_JC ( ) const
inline
560  {
561  return ePara_JC;
562  }

◆ GetPara_LT()

Para_LT EdbShowerP::GetPara_LT ( ) const
inline
554  {
555  return ePara_LT;
556  }

◆ GetPara_PP()

Para_PP EdbShowerP::GetPara_PP ( ) const
inline
569  {
570  return ePara_PP;
571  }

◆ GetPara_SE()

Para_SE EdbShowerP::GetPara_SE ( ) const
inline
575  {
576  return ePara_SE;
577  }

◆ GetPara_XX()

Para_XX EdbShowerP::GetPara_XX ( ) const
inline
563  {
564  return ePara_XX;
565  }

◆ GetPara_YC()

Para_YC EdbShowerP::GetPara_YC ( ) const
inline
557  {
558  return ePara_YC;
559  }

◆ GetPara_YY()

Para_YY EdbShowerP::GetPara_YY ( ) const
inline
566  {
567  return ePara_YY;
568  }

◆ GetParametrisationIsDone()

Bool_t EdbShowerP::GetParametrisationIsDone ( Int_t  nr) const
inline
546  {
547  return eParametrisationIsDone[nr];
548  }

◆ GetParaVariable()

Float_t EdbShowerP::GetParaVariable ( Int_t  ParaVariable,
Int_t  ParaNr 
)
2240 {
2241  Log(3,"EdbShowerP::GetParaVariable()","EdbShowerP::GetParaVariable()");
2242 
2243  // Stupid Workaround to return the parameters of the Parametrizations ....
2244  // But it is not necessary anymore since we can get Parametrisation
2245  // structures direcly using EdbShowerP::Para_PP new_Para_PP like this.
2246  if (ParaNr==6) {
2247  if (ParaVariable==0) return (Float_t)ePara_PP.ShowerAxisAngle;
2248  if (ParaVariable==1) return (Float_t)ePara_PP.nseg;
2249  if (ParaVariable==2) return (Float_t)ePara_PP.ePairOpeningAngle;
2250  if (ParaVariable==3) return (Float_t)ePara_PP.ePairOpeningDist_dMin;
2251  if (ParaVariable==4) return (Float_t)ePara_PP.ePairOpeningDist_dR;
2252  return 0;
2253  }
2254  if (ParaNr==0) {
2255  if (ParaVariable==0) return (Float_t)ePara_FJ.ShowerAxisAngle;
2256  if (ParaVariable==1) return (Float_t)ePara_FJ.nseg;
2257  if (ParaVariable==2) return (Float_t)ePara_FJ.BT_deltaR_mean;
2258  if (ParaVariable==3) return (Float_t)ePara_FJ.BT_deltaR_rms;
2259  if (ParaVariable==4) return (Float_t)ePara_FJ.BT_deltaT_mean;
2260  if (ParaVariable==5) return (Float_t)ePara_FJ.BT_deltaT_rms;
2261  return 0;
2262  }
2263  if (ParaNr==2) {
2264  if (ParaVariable==0) return (Float_t)ePara_YC.ShowerAxisAngle;
2265  if (ParaVariable==1) return (Float_t)ePara_YC.nseg;
2266  if (ParaVariable==2) return (Float_t)ePara_YC.C1;
2267  if (ParaVariable==3) return (Float_t)ePara_YC.a1;
2268  if (ParaVariable==4) return (Float_t)ePara_YC.alpha;
2269  if (ParaVariable==5) return (Float_t)ePara_YC.nmax;
2270  return 0;
2271  }
2272  if (ParaNr==4) {
2273  if (ParaVariable==0) return (Float_t)ePara_XX.ShowerAxisAngle;
2274  if (ParaVariable==1) return (Float_t)ePara_XX.nseg;
2275  if (ParaVariable==2) return (Float_t)ePara_XX.Mean_ProfileLongitudinal;
2276  if (ParaVariable==3) return (Float_t)ePara_XX.RMS_ProfileLongitudinal;
2277  if (ParaVariable==4) return (Float_t)ePara_XX.Max_ProfileLongitudinal;
2278  if (ParaVariable==5) return (Float_t)ePara_XX.Mean_ProfileTransversal;
2279  if (ParaVariable==6) return (Float_t)ePara_XX.RMS_ProfileTransversal;
2280  if (ParaVariable==7) return (Float_t)ePara_XX.Max_ProfileTransversal;
2281  if (ParaVariable==8) return (Float_t)ePara_XX.Last_ProfileLongitudinal;
2282  if (ParaVariable==9) return (Float_t)ePara_XX.Last_ProfileTransversal;
2283  return 0;
2284  }
2285  if (ParaNr==5) {
2286  if (ParaVariable==0) return (Float_t)ePara_YY.ShowerAxisAngle;
2287  if (ParaVariable==1) return (Float_t)ePara_YY.nseg;
2288  if (ParaVariable>=2&&ParaVariable<=6) return (Float_t)ePara_YY.ProfileTransversalBincontent[ParaVariable];
2289  if (ParaVariable>=7) return (Float_t)(Float_t)ePara_YY.ProfileLongitudinalBincontent[ParaVariable-6+1];
2290  return 0;
2291  }
2292  if (ParaNr==8) {
2293  if (ParaVariable==0) return (Float_t)ePara_SE.ShowerAxisAngle;
2294  if (ParaVariable==1) return (Float_t)ePara_SE.nseg;
2295  if (ParaVariable==2) return (Float_t)ePara_SE.npl;
2296  if (ParaVariable==3) return (Float_t)ePara_SE.efficiencyAtShowerAxisAngle;
2297  return 0;
2298  }
2299  else {
2300  Log(3,"EdbShowerP::GetParaVariable()","Other parametrisations are not yet supported!");
2301  }
2302 
2303  Log(3,"EdbShowerP::GetParaVariable()","EdbShowerP::GetParaVariable()...done.");
2304  return 0;
2305 }

◆ GetPDG()

Int_t EdbShowerP::GetPDG ( ) const
inline
459  {
460  return PDG();
461  }
Int_t PDG() const
Definition: EdbShowerP.h:456

◆ GetProfileLongitudinal()

TH1F* EdbShowerP::GetProfileLongitudinal ( ) const
inline
538  {
539  return eProfileLongitudinal;
540  }

◆ GetProfileLongitudinalPlate()

TH1F * EdbShowerP::GetProfileLongitudinalPlate ( )
2813 {
2814 
2815  // This function returns a histogram using filmnumbers
2816  // this is equivalent like "treebranch->Draw("nfilmb")..."
2817  // EdbShowerP::PrintParametrisation_FJ() ePara_FJ.longprofile=
2818  // 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ..... 52 53 54 55 56
2819  // 1 2 2 2 2 2 2 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ....-1 -1 -1 -1 -1 -1
2820 
2821  // Returns a Histogram, equivalent to ePara_FJ.longprofile bin entries;
2822  TH1F* eProfileLongitudinalPlate = new TH1F("eProfileLongitudinalPlate","eProfileLongitudinalPlate",57,0,57);
2823 
2824  // Do not fill with -1 entries, use here instead 0s.
2825  for (int i=1; i<57; ++i) if ( ePara_FJ.longprofile[i-1]>=0) eProfileLongitudinalPlate->SetBinContent( i, ePara_FJ.longprofile[i-1] );
2826 
2827  return eProfileLongitudinalPlate;
2828 }

◆ GetProfileTransversal()

TH1F* EdbShowerP::GetProfileTransversal ( ) const
inline
541  {
542  return eProfileTransversal;
543  }

◆ GetPurity()

Float_t EdbShowerP::GetPurity ( ) const
inline
532  {
533  return ePurity;
534  }

◆ GetSegment()

EdbSegP* EdbShowerP::GetSegment ( int  i) const
inline
435  {
436  return (eS) ? (EdbSegP*)(eS->At(i)) : 0;
437  }

◆ GetSegmentAngle()

Float_t EdbShowerP::GetSegmentAngle ( ) const
inline
479  {
480  return eShowerAxisAngle;
481  }

◆ GetSegmentArray()

TObjArray* EdbShowerP::GetSegmentArray ( )
inline
425  {
426  return eS;
427  }

◆ GetSegmentFirst()

EdbSegP* EdbShowerP::GetSegmentFirst ( ) const
inline
429  {
430  return (eS) ? (EdbSegP*)(eS->First()) : 0;
431  }

◆ GetSegmentFirstZ()

Float_t EdbShowerP::GetSegmentFirstZ ( ) const
inline
439  {
440  return (eS) ? ((EdbSegP*)eS->First())->Z() : 9999999;
441  }

◆ GetSegmentGravity()

EdbSegP* EdbShowerP::GetSegmentGravity ( ) const
inline
476  {
478  }

◆ GetSegmentLast()

EdbSegP* EdbShowerP::GetSegmentLast ( ) const
inline
432  {
433  return (eS) ? (EdbSegP*)(eS->Last()) : 0;
434  }

◆ GetSegmentLastZ()

Float_t EdbShowerP::GetSegmentLastZ ( ) const
inline
442  {
443  return (eS) ? ((EdbSegP*)eS->Last())->Z() : 9999999;
444  }

◆ GetSphericity()

Float_t EdbShowerP::GetSphericity ( ) const
inline
535  {
536  return eSphericity;
537  }

◆ Help()

void EdbShowerP::Help ( )
2662 {
2663  cout << "---------------------------------------------------------" <<
2664  endl;
2665  cout << "EdbShowerP::Help()" << endl << endl;
2666  cout << " What is this?" << endl;
2667  cout << " An EdbShowerP is similar to an EdbTrackP is similar to an EdbSegP object." << endl;
2668  cout << " Usually a shower is a collection of some BaseTracks. Good showers have many, bad ones have few ;-) " << endl;
2669  cout << " A shower spreads over same plates, leaving a distinct signal in your viewer (EDA od EDD)." << endl << endl;
2670  cout << " What can we do with this?" << endl;
2671  cout << " Usually a shower is used to detect electron (rarely in OPERA) or photon interactions (more often)." << endl;
2672  cout << " Then -if the shower is well reconstructed (see-> EdbShowRec object)- the EdbShowerP has particular" << endl;
2673  cout << " characteristics from which we can conclude interesting values, like energy / particle Id and so on..." << endl << endl;
2674  cout << " Technical details, information about the shower:" << endl;
2675  cout << " ->N() : returns number of segments (basetracks) in this shower." << endl;
2676  cout << " ->Npl() : returns number of plates, the shower passes." << endl;
2677  cout << " ->N0() : returns number of (connected) plates, in which there are no basetracks at all." << endl;
2678  cout << " The shower profile:" << endl;
2679  cout << " Two profiles exist: The Longitudinal and the Transversal Profile:" << endl;
2680  cout << " The Longitudinal Profile:" << endl;
2681  cout << " You can get the longitudinal profile with a ROOT histogram:" << endl;
2682  cout << " ->GetHistogramProfileLongitudinal() . It uses Z postion values w.r.t. the starting point of the shower." << endl;
2683  cout << " ->GetHistogramProfileLongitudinalPlate() . It uses plate postion values w.r.t. the starting plate of the shower." << endl;
2684  cout << " ->GetHistogramProfileTransversal() . It uses Z postion values w.r.t. the starting point of the shower." << endl;
2685  cout << " The shower parametrisations:" << endl;
2686  cout << " ->GetPara_..() Get the corresponding parametrisation structure:" << endl;
2687  cout << " ->GetPara_..() Possible Options: _FJ _YC _XX _YY _PP _AS _SE _ExtraInfo" << endl;
2688  cout << " ->PrintPara_..() Print the corresponding parametrisation structure." << endl;
2689  cout << " ->BuildPara_..() Build the corresponding parametrisation structure." << endl;
2690  cout << " Technical details, manipulation of the shower:" << endl;
2691  cout << " ->AddSegment(EdbSegP*)." << endl;
2692  cout << " ->RemoveSegment(EdbSegP*)." << endl;
2693  cout << " ->AddShower(EdbShowerP*)." << endl;
2694  cout << " ->RemoveShower(EdbShowerP*)." << endl;
2695  cout << " ->Sort() Sort Segments of the shower by ascending Z." << endl;
2696  cout << " Technical details, Update of the shower:" << endl;
2697  cout << " ->Update() Partial update (no rebuild of parametrisations)" << endl;
2698  cout << " ->UpdateX() Full update (with rebuild of parametrisations." << endl;
2699  cout << endl;
2700  cout << "---------------------------------------------------------" << endl;
2701  return;
2702 }

◆ Init()

void EdbShowerP::Init ( void  )
115 {
116  // Default Init function:
117  // all objects persistently there, created with a "new" operator,
118  // i.e. objects which are created only once..
119  eReco_ID_Array = new TObjArray;
120  eReco_E_Array = new TObjArray;
121  eReco_Vtx_Array = new TObjArray;
122 
123 }

◆ IsSorted()

Bool_t EdbShowerP::IsSorted ( )
387 {
388  // returns 1 if shower segments are all sorted in ascending Z direction.
389  for (int i=0; i< this->N()-1; i++) {
390  EdbSegP* seg = this->GetSegment(i);
391  EdbSegP* segnext = this->GetSegment(i+1);
392  if (segnext->Z()<seg->Z()) return 0;
393  }
394  return 1;
395 }

◆ M()

Float_t EdbShowerP::M ( ) const
inline
465  {
466  return eM;
467  }
Float_t eM
vertex to which the shower start is attached to
Definition: EdbShowerP.h:67

◆ MergeFromShower()

void EdbShowerP::MergeFromShower ( EdbShowerP show,
Int_t  MergingType = 1 
)

-— EXPERIMENTAL STATUS —

1055 {
1056  switch (MergingType) {
1057  case 0 :
1059  break;
1060  case 1 :
1062  break;
1063  default :
1065  break;
1066  }
1067  return;
1068 }
void MergeFromShowerByPosition(EdbShowerP *show)
Definition: EdbShowerP.cxx:1136
void MergeFromShowerByAddress(EdbShowerP *show)
Definition: EdbShowerP.cxx:1072

◆ MergeFromShowerByAddress()

void EdbShowerP::MergeFromShowerByAddress ( EdbShowerP show)
1073 {
1074  // Should only be used for data from the SAME EdbPVRec Object since there by definition each segment has different
1075  // address. Otherwise duplications can appear!
1076  cout << "EdbShowerP::MergeFromShowerByAddress().... EXPERIMENTAL STATUS ... PLEASE BE CAREFUL AND CHECK YOUR " << endl;
1077  cout << "EdbShowerP::MergeFromShowerByAddress().... EXPERIMENTAL STATUS ... RESULTS TO CONSITENCY" << endl;
1078 
1079  // First Check if the two showers are different. If they are the same
1080  // it makes no sense to merge them...
1081  cout <<" &this = " << this << endl;
1082  cout <<" &show = " << show << endl;
1083  if (this==show) {
1084  cout << "EdbShowerP::MergeFromShowerByAddress() Shower and shower to merge are identical. Skip this function and return." << endl;
1085  return;
1086  }
1087 
1088  // No do the comparison: for the shower segments of "this" and the object "show" to merge in
1089  // are looped and memory addresses (or positions and angles???) are compared.
1090 
1091  cout << "EdbShowerP::MergeFromShowerByAddress() Loop over " << eNBT << " BTs comparing with "<< show->GetNBT() << " BTs from the outher shower"<<endl;
1092  EdbSegP* seg1;
1093  EdbSegP* seg2;
1094 
1095  Int_t NewAdded=0;
1096  Bool_t IsNewAdded=kFALSE;
1097 
1098  for (Int_t j=0; j<show->GetNBT() ; j++) {
1099  for (Int_t i=0; i<eNBT; i++) {
1100 
1101  seg1=this->GetSegment(i);
1102  seg2=show->GetSegment(j);
1103 
1104  // Compare using Adresses:
1105  if (seg1!=seg2) {
1106  cout << "EdbShowerP::MergeFromShowerByAddress() seg1 and seg2 are not identical. Add to shower." << endl;
1107 
1108  this->AddSegment(seg2);
1109 
1110  ++NewAdded;
1111  IsNewAdded=kTRUE;
1112  }
1113  //cout << "----------"<<endl;
1114 
1115  if (IsNewAdded) {
1116  IsNewAdded=kFALSE;
1117  break;
1118  }
1119  }
1120  }
1121 
1122  cout << "EdbShowerP::MergeFromShowerByAddress() NewAdded BaseTracks: " << NewAdded << endl;
1123 
1124  // ReUpdate shower, since we have most likely a different shower now:
1125  this->Update();
1126 
1127  cout << "EdbShowerP::MergeFromShowerByAddress() ...done." << endl;
1128  return;
1129 }
Int_t GetNBT() const
Definition: EdbShowerP.h:513

◆ MergeFromShowerByPosition()

void EdbShowerP::MergeFromShowerByPosition ( EdbShowerP show)
1137 {
1138  cout << "EdbShowerP::MergeFromShowerByPosition()" << endl;
1139  cout << "EdbShowerP::MergeFromShowerByPosition().... EXPERIMENTAL STATUS ... PLEASE BE CAREFUL AND CHECK YOUR " << endl;
1140  cout << "EdbShowerP::MergeFromShowerByPosition().... EXPERIMENTAL STATUS ... RESULTS TO CONSITENCY" << endl;
1141 
1142  Float_t space_diff=0.1;
1143  Float_t angular_diff=0.001;
1144 
1145  // No do the comparison: for the shower segments of "this" and the object "show" to merge in
1146  // are looped and positions and angles are compared.
1147 
1148  cout << "EdbShowerP::MergeFromShowerByPosition() Loop over " << eNBT << " BTs comparing with "<< show->GetNBT() << " BTs from the outher shower"<<endl;
1149  EdbSegP* seg1=0;
1150  EdbSegP* seg2=0;
1151 
1152  Int_t NewAdded=0;
1153  Bool_t IsNewAdded=kFALSE;
1154  Bool_t DontAdd=kTRUE;
1155 
1156  for (Int_t j=0; j<show->GetNBT() ; j++) {
1157  DontAdd=kFALSE;
1158  for (Int_t i=0; i<eNBT; i++) {
1159 
1160  seg1=this->GetSegment(i);
1161  seg2=show->GetSegment(j);
1162 
1163  // Compare using positions:
1164  if (TMath::Abs(seg1->X()-seg2->X())< space_diff || TMath::Abs(seg1->Y()-seg2->Y())<space_diff || TMath::Abs(seg1->TX()-seg2->TX())< angular_diff || TMath::Abs(seg1->TY()-seg2->TY())<angular_diff ) {
1165  cout << "EdbShowerP::MergeFromShowerByPosition() seg1 (from base shower) and seg2 (from adding shower) are identical. DONT Add to shower." << endl;
1166  DontAdd=kTRUE;
1167  }
1168  } // for (Int_t i=0; i<eNBT; i++)
1169 
1170  if (DontAdd) continue;
1171 
1172  this->AddSegment(seg2);
1173  ++NewAdded;
1174  IsNewAdded=kTRUE;
1175  }
1176  cout << "EdbShowerP::MergeFromShowerByPosition() NewAdded BaseTracks: " << NewAdded << endl;
1177 
1178  // ReUpdate shower, since we have most likely a different shower now:
1179  if (NewAdded>0) this->Update();
1180  cout << "EdbShowerP::MergeFromShowerByPosition() ...done." << endl;
1181  return;
1182 }

◆ N()

Int_t EdbShowerP::N ( ) const
inline
412  {
413  return (eS) ? eS->GetEntries() : 0;
414  }

◆ N0()

Int_t EdbShowerP::N0 ( ) const
inline
400  {
401  return eN0;
402  }

◆ N00()

Int_t EdbShowerP::N00 ( ) const
inline
421  {
422  return eN00;
423  }

◆ Npl()

Int_t EdbShowerP::Npl ( ) const
inline
409  {
410  return eNpl;
411  }

◆ PDG()

Int_t EdbShowerP::PDG ( ) const
inline
456  {
457  return ePDG;
458  }
Int_t ePDG
Definition: EdbShowerP.h:68

◆ Print()

void EdbShowerP::Print ( )

-— EXPERIMENTAL STATUS —

Delete the histograms only... /// -— EXPERIMENTAL STATUS —

2334 {
2335  PrintNice();
2336  return;
2337 }
void PrintNice()
Definition: EdbShowerP.cxx:2339

◆ PrintAll()

void EdbShowerP::PrintAll ( )
2647 {
2648  cout << "EdbShowerP::PrintAll()" << endl;
2649  PrintMetaData();
2650  PrintBasics();
2651  PrintSegments();
2652  return;
2653 }
void PrintMetaData()
Definition: EdbShowerP.cxx:2345
void PrintBasics()
Definition: EdbShowerP.cxx:2360

◆ PrintBasics()

void EdbShowerP::PrintBasics ( )
2361 {
2362  cout << "EdbShowerP::PrintBasics()" << endl;
2363  printf( "EdbShowerP: ID= %6d, N=%6d, NMC=%6d, N0=%6d, NPl=%6d, MCEvt= %6d: \n", ID(), N(), eNBTMC, N0(), Npl(),eMC );
2364  return;
2365 }
Int_t N0() const
Definition: EdbShowerP.h:400

◆ PrintMCInfo_PGun()

void EdbShowerP::PrintMCInfo_PGun ( )
2624 {
2625  cout << "EdbShowerP::PrintMCInfo_PGun"<< endl;
2626  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.MCEvt= " << eMCInfo_PGun.MCEvt << endl;
2627  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.PDGId= " << eMCInfo_PGun.PDGId << endl;
2628  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.energy= " << eMCInfo_PGun.energy << endl;
2629  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.tantheta= " << eMCInfo_PGun.tantheta << endl;
2630  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.dirx= " << eMCInfo_PGun.dirx << endl;
2631  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.diry= " << eMCInfo_PGun.diry << endl;
2632  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.dirz= " << eMCInfo_PGun.dirz << endl;
2633  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.TX= " << eMCInfo_PGun.TX << endl;
2634  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.TY= " << eMCInfo_PGun.TY << endl;
2635  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.X= " << eMCInfo_PGun.X << endl;
2636  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.Y= " << eMCInfo_PGun.Y << endl;
2637  cout << "EdbShowerP::PrintMCInfo_PGun() eMCInfo_PGun.Z= " << eMCInfo_PGun.Z << endl;
2638  return;
2639 }
Float_t Y
Definition: EdbShowerP.h:287
Int_t MCEvt
Definition: EdbShowerP.h:275
Float_t Z
Definition: EdbShowerP.h:289
Int_t PDGId
Definition: EdbShowerP.h:276
Float_t X
Definition: EdbShowerP.h:288
Float_t TX
Definition: EdbShowerP.h:285
Float_t tantheta
Definition: EdbShowerP.h:278
Float_t diry
Definition: EdbShowerP.h:280
Float_t dirz
Definition: EdbShowerP.h:281
Float_t TY
Definition: EdbShowerP.h:286
Float_t energy
Definition: EdbShowerP.h:277
Float_t dirx
Definition: EdbShowerP.h:279

◆ PrintMetaData()

void EdbShowerP::PrintMetaData ( )
2346 {
2347  cout << "EdbShowerP::PrintMetaData()" << endl;
2348  cout << "eAlgName= " << setw(14) << eAlgName << ", eAlgValue= " << setw(14) << eAlgValue << endl;
2349  for (int i=0; i<6; i++) {
2350  cout << setw(10) << eParaValue[i]<< " ";
2351  }
2352  cout << endl;
2353  for (int i=0; i<6; i++) {
2354  cout << setw(10) << eParaString[i]<< " ";
2355  }
2356  cout << endl;
2357  return;
2358 }
Int_t eAlgValue
Definition: EdbShowerP.h:40
Float_t eParaValue[10]
Definition: EdbShowerP.h:41
TString eParaString[10]
Definition: EdbShowerP.h:42
TString eAlgName
Definition: EdbShowerP.h:39

◆ PrintNice()

void EdbShowerP::PrintNice ( )
2340 {
2341  printf( "EdbShowerP::PrintNice(): ID= %6d, N=%6d, NMC=%6d, N0=%6d, NPl=%6d, x= %14.3f, y= %14.3f, z= %14.3f, tx= %7.4f, ty= %7.4f, MCEvt= %6d: \n", ID(), N(), eNBTMC, N0(), Npl(), X(),Y(),Z(),TX(),TY(),eMC );
2342  return;
2343 }

◆ PrintParametrisation()

void EdbShowerP::PrintParametrisation ( Int_t  ParaNr = 0)
2377 {
2378  cout << "EdbShowerP::PrintParametrisation("<<ParaNr<<")"<< endl;
2379 
2380  if (ParaNr==0) PrintParametrisation_FJ();
2381  if (ParaNr==1) PrintParametrisation_LT();
2382  if (ParaNr==2) PrintParametrisation_YC();
2383  if (ParaNr==3) PrintParametrisation_JC();
2384  if (ParaNr==4) PrintParametrisation_XX();
2385  if (ParaNr==5) PrintParametrisation_YY();
2386  if (ParaNr==6) PrintParametrisation_PP();
2387  if (ParaNr==7) PrintParametrisation_AS();
2388  if (ParaNr==8) PrintParametrisation_SE();
2389  return;
2390 }
void PrintParametrisation_JC()
Definition: EdbShowerP.cxx:2479
void PrintParametrisation_SE()
Definition: EdbShowerP.cxx:2593
void PrintParametrisation_YY()
Definition: EdbShowerP.cxx:2533
void PrintParametrisation_LT()
Definition: EdbShowerP.cxx:2419
void PrintParametrisation_XX()
Definition: EdbShowerP.cxx:2513
void PrintParametrisation_FJ()
Definition: EdbShowerP.cxx:2392
void PrintParametrisation_YC()
Definition: EdbShowerP.cxx:2457
void PrintParametrisation_AS()
Definition: EdbShowerP.cxx:2577
void PrintParametrisation_PP()
Definition: EdbShowerP.cxx:2561

◆ PrintParametrisation_AS()

void EdbShowerP::PrintParametrisation_AS ( )
2578 {
2579  cout << "EdbShowerP::PrintParametrisation_AS"<< endl;
2580  cout << "EdbShowerP::PrintParametrisation_AS REMINDER: AS stands for ALL SEGMENTS, but only the first 50 segs will be used !"<< endl;
2581  if (!eParametrisationIsDone[7]) {
2582  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2583  return;
2584  }
2585  cout << ePara_AS.nseg << endl;
2586  for (int i=0; i<50; i++) {
2587  cout << i << " " << ePara_AS.edIP[i] << " " << ePara_AS.edMin[i] << " " << ePara_AS.edRLong[i] << " " << ePara_AS.edRTrans[i] << " " << ePara_AS.edeltarb[i] << " " << ePara_AS.edeltathetab[i] << endl;
2588  }
2589  return;
2590 }

◆ PrintParametrisation_ExtraInfo()

void EdbShowerP::PrintParametrisation_ExtraInfo ( )
2607 {
2608  cout << "EdbShowerP::PrintParametrisation_ExtraInfo"<< endl;
2609  if (!eExtraInfoIsDone[0]) cout << "EdbShowerP::PrintParametrisation_ExtraInfo() PARA NOT YET BUILD ! "<< endl;
2610  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.InBT_E = " << ePara_ExtraInfo.InBT_Flag << endl;
2611  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.InBT_Flag= " << ePara_ExtraInfo.InBT_Flag << endl;
2612  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.InPairBT_E= " << ePara_ExtraInfo.InPairBT_E << endl;
2613 
2614  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.ShowerLength= " << ePara_ExtraInfo.ShowerLength << endl;
2615  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.InBT_IPToVtx= " << ePara_ExtraInfo.InBT_IPToVtx << endl;
2616  cout << "EdbShowerP::PrintParametrisation_ExtraInfo() ePara_ExtraInfo.InBT_DeltaZToVtx= " << ePara_ExtraInfo.InBT_DeltaZToVtx << endl;
2617  return;
2618 }
Float_t InBT_DeltaZToVtx
Definition: EdbShowerP.h:265
Float_t InBT_IPToVtx
Definition: EdbShowerP.h:264

◆ PrintParametrisation_FJ()

void EdbShowerP::PrintParametrisation_FJ ( )
2393 {
2394  cout << "EdbShowerP::PrintParametrisation_FJ"<< endl;
2395  if (!eParametrisationIsDone[0]) {
2396  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2397  return;
2398  }
2399  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.ShowerAxisAngle= " << ePara_FJ.ShowerAxisAngle << endl;
2400  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.nseg= " << ePara_FJ.nseg << endl;
2401  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.BT_deltaR_mean= " << ePara_FJ.BT_deltaR_mean << endl;
2402  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.BT_deltaR_rms= " << ePara_FJ.BT_deltaR_rms << endl;
2403  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.BT_deltaT_mean= " << ePara_FJ.BT_deltaT_mean << endl;
2404  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.BT_deltaT_rms= " << ePara_FJ.BT_deltaT_rms << endl;
2405  cout << "EdbShowerP::PrintParametrisation_FJ() ePara_FJ.longprofile= " << endl;
2406 
2407  for (int i=0; i<57; i++) {
2408  cout << setw(3) << i;
2409  }
2410  cout << endl;
2411  for (int i=0; i<57; i++) {
2412  cout << setw(3) << ePara_FJ.longprofile[i];
2413  }
2414  cout << endl;
2415  return;
2416 }

◆ PrintParametrisation_JC()

void EdbShowerP::PrintParametrisation_JC ( )
2480 {
2481  cout << "EdbShowerP::PrintParametrisation_JC"<< endl;
2482  if (!eParametrisationIsDone[3]) {
2483  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2484  return;
2485  }
2486  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.ShowerAxisAngle= " << ePara_JC.ShowerAxisAngle << endl;
2487  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.nseg= " << ePara_JC.nseg << endl;
2488  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.C1= " << ePara_JC.C1 << endl;
2489  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.a1= " << ePara_JC.a1 << endl;
2490  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.alpha= " << ePara_JC.alpha << endl;
2491  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.nmax= " << ePara_JC.nmax << endl;
2492  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.ShowerAxisAngle= " << ePara_JC.ShowerAxisAngle << endl;
2493  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.nseg= " << ePara_JC.nseg << endl;
2494  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.BT_deltaR_mean= " << ePara_JC.BT_deltaR_mean << endl;
2495  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.BT_deltaR_rms= " << ePara_JC.BT_deltaR_rms << endl;
2496  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.BT_deltaT_mean= " << ePara_JC.BT_deltaT_mean << endl;
2497  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.BT_deltaT_rms= " << ePara_JC.BT_deltaT_rms << endl;
2498  cout << "EdbShowerP::PrintParametrisation_JC() ePara_JC.longprofile= " << endl;
2499 
2500  for (int i=0; i<57; i++) {
2501  cout << setw(3) << i;
2502  }
2503  cout << endl;
2504  for (int i=0; i<57; i++) {
2505  cout << setw(3) << ePara_JC.longprofile[i];
2506  }
2507  cout << endl;
2508  return;
2509 }

◆ PrintParametrisation_LT()

void EdbShowerP::PrintParametrisation_LT ( )
2420 {
2421  cout << "EdbShowerP::PrintParametrisation_LT"<< endl;
2422  if (!eParametrisationIsDone[1]) {
2423  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2424  return;
2425  }
2426  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.ShowerAxisAngle= " << ePara_LT.ShowerAxisAngle << endl;
2427  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.nseg= " << ePara_LT.nseg << endl;
2428  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.BT_deltaR_mean= " << ePara_LT.BT_deltaR_mean << endl;
2429  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.BT_deltaR_rms= " << ePara_LT.BT_deltaR_rms << endl;
2430  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.BT_deltaT_mean= " << ePara_LT.BT_deltaT_mean << endl;
2431  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.BT_deltaT_rms= " << ePara_LT.BT_deltaT_rms << endl;
2432 
2433  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.transprofile= " << endl;
2434  for (int i=0; i<8; i++) {
2435  cout << setw(3) << i;
2436  }
2437  cout << endl;
2438  for (int i=0; i<8; i++) {
2439  cout << setw(3) << ePara_LT.transprofile[i];
2440  }
2441  cout << endl;
2442 
2443  cout << "EdbShowerP::PrintParametrisation_LT() ePara_LT.longprofile= " << endl;
2444  for (int i=0; i<57; i++) {
2445  cout << setw(3) << i;
2446  }
2447  cout << endl;
2448  for (int i=0; i<57; i++) {
2449  cout << setw(3) << ePara_LT.longprofile[i];
2450  }
2451  cout << endl;
2452  return;
2453 }

◆ PrintParametrisation_PP()

void EdbShowerP::PrintParametrisation_PP ( )
2562 {
2563  cout << "EdbShowerP::PrintParametrisation_PP"<< endl;
2564  if (!eParametrisationIsDone[6]) {
2565  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2566  return;
2567  }
2568  cout << "EdbShowerP::PrintParametrisation_PP() ePara_PP.ShowerAxisAngle= " << ePara_PP.ShowerAxisAngle << endl;
2569  cout << "EdbShowerP::PrintParametrisation_PP() ePara_PP.nseg= " << ePara_PP.nseg << endl;
2570  cout << "EdbShowerP::PrintParametrisation_PP() ePara_PP.ePairOpeningAngle= " << ePara_PP.ePairOpeningAngle << endl;
2571  cout << "EdbShowerP::PrintParametrisation_PP() ePara_PP.ePairOpeningDist_dR= " << ePara_PP.ePairOpeningDist_dR << endl;
2572  cout << "EdbShowerP::PrintParametrisation_PP() ePara_PP.ePairOpeningDist_dMin= " << ePara_PP.ePairOpeningDist_dMin << endl;
2573  cout << "EdbShowerP::PrintParametrisation_PP ... STILL TO IMPROVE WITH MORE VARIABLES.. .. ... ..."<< endl;
2574  return;
2575 }

◆ PrintParametrisation_SE()

void EdbShowerP::PrintParametrisation_SE ( )
2594 {
2595 
2596  cout << "EdbShowerP::PrintParametrisation_SE"<< endl;
2597  if (!eParametrisationIsDone[8]) cout << "EdbShowerP::PrintParametrisation_SE() PARA NOT YET BUILD ! "<< endl;
2598  cout << "EdbShowerP::PrintParametrisation_SE() ePara_SE.ShowerAxisAngle= " << ePara_SE.ShowerAxisAngle << endl;
2599  cout << "EdbShowerP::PrintParametrisation_SE() ePara_SE.nseg= " << ePara_SE.nseg << endl;
2600  cout << "EdbShowerP::PrintParametrisation_SE() ePara_SE.npl= " << ePara_SE.npl << endl;
2601  cout << "EdbShowerP::PrintParametrisation_SE() ePara_SE.efficiencyAtShowerAxisAngle= " << ePara_SE.efficiencyAtShowerAxisAngle << endl;
2602  return;
2603 }

◆ PrintParametrisation_XX()

void EdbShowerP::PrintParametrisation_XX ( )
2514 {
2515  cout << "EdbShowerP::PrintParametrisation_XX"<< endl;
2516  if (!eParametrisationIsDone[4]) {
2517  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2518  return;
2519  }
2520  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.ShowerAxisAngle= " << ePara_XX.ShowerAxisAngle << endl;
2521  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.nseg= " << ePara_XX.nseg << endl;
2522  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Mean_ProfileLongitudinal= " << ePara_XX.Mean_ProfileLongitudinal << endl;
2523  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.RMS_ProfileLongitudinal= " << ePara_XX.RMS_ProfileLongitudinal << endl;
2524  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Max_ProfileLongitudinal= " << ePara_XX.Max_ProfileLongitudinal << endl;
2525  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Mean_ProfileTransversal= " << ePara_XX.Mean_ProfileTransversal << endl;
2526  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.RMS_ProfileTransversal= " << ePara_XX.RMS_ProfileTransversal << endl;
2527  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Max_ProfileTransversal= " << ePara_XX.Max_ProfileTransversal << endl;
2528  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Last_ProfileLongitudinal= " << ePara_XX.Last_ProfileLongitudinal << endl;
2529  cout << "EdbShowerP::PrintParametrisation_XX() ePara_XX.Last_ProfileTransversal= " << ePara_XX.Last_ProfileTransversal << endl;
2530  return;
2531 }

◆ PrintParametrisation_YC()

void EdbShowerP::PrintParametrisation_YC ( )
2458 {
2459  cout << "EdbShowerP::PrintParametrisation_YC"<< endl;
2460  if (!eParametrisationIsDone[2]) {
2461  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2462  return;
2463  }
2464  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.ShowerAxisAngle= " << ePara_YC.ShowerAxisAngle << endl;
2465  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.nseg= " << ePara_YC.nseg << endl;
2466  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.C1= " << ePara_YC.C1 << endl;
2467  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.a1= " << ePara_YC.a1 << endl;
2468  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.alpha= " << ePara_YC.alpha << endl;
2469  cout << "EdbShowerP::PrintParametrisation_YC() ePara_YC.nmax= " << ePara_YC.nmax << endl;
2470 
2471  if (ePara_YC.C1==0 || ePara_YC.a1 == 0 ) {
2472  PrintNice();
2473  GetSegment(0)->Print();
2474  PrintSegments();
2475  }
2476  return;
2477 }
void Print(Option_t *opt="") const
Definition: EdbSegP.cxx:405

◆ PrintParametrisation_YY()

void EdbShowerP::PrintParametrisation_YY ( )
2534 {
2535  cout << "EdbShowerP::PrintParametrisation_YY"<< endl;
2536  if (!eParametrisationIsDone[5]) {
2537  cout << "EdbShowerP::PrintParametrisation() PARA NOT YET BUILD ! "<< endl;
2538  return;
2539  }
2540  cout << "EdbShowerP::PrintParametrisation_YY() ePara_YY.ShowerAxisAngle= " << ePara_YY.ShowerAxisAngle << endl;
2541  cout << "EdbShowerP::PrintParametrisation_YY() Longitudinal Profile (not plates!, but dist w.r.t. to shower axis!)"<<endl;
2542  cout << "EdbShowerP::PrintParametrisation_YY() (take Plate Profile instead if you want have this):"<<endl;
2543 
2544  for (int i=1; i<57; i++) {
2545  cout << setw(3) << i;
2546  }
2547  cout << endl;
2548  for (int i=1; i<57; i++) {
2549  cout << setw(3) << ePara_YY.ProfileLongitudinalBincontent[i];
2550  }
2551  cout << endl;
2552  cout << "EdbShowerP::PrintParametrisation_YY() Transversal Profile (not plates!, but dist w.r.t. to shower axis!)"<<endl;
2553  for (int i=1; i<8; i++) {
2554  cout << setw(3) << ePara_YY.ProfileTransversalBincontent[i];
2555  }
2556  cout << endl;
2557 
2558  return;
2559 }

◆ PrintSegments()

void EdbShowerP::PrintSegments ( )
2368 {
2369  cout << "EdbShowerP::PrintSegments:()" << endl;
2370  for (int i=0; i<eNBT; i++) {
2371  this->GetSegment(i)->PrintNice();
2372  }
2373  return;
2374 }

◆ RemoveSegment()

void EdbShowerP::RemoveSegment ( EdbSegP s,
Bool_t  UpdateAll = kFALSE 
)
342 {
343  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::RemoveSegment()" << endl;
344  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::RemoveSegment() Object s* to be removed " << s << endl;
345  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::RemoveSegment() shower->N() " << N() << endl;
346  if (!eS) return;
347  eS->Remove(s);
348  eS->Compress();
349  eNBT=N();
350  // It is ABSOLUTELY Necessary to run Compress() on the object array. Otherwise the
351  // removed object will stay as NullPointer. And then any operation on this
352  // will lead to a crash! See:
353  // http://root.cern.ch/phpBB3/viewtopic.php?f=3&t=10371&p=44643#p44643
354  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::RemoveSegment() Removal done. Adapt eNBT:" << endl;
355  if (gEDBDEBUGLEVEL>3) cout << "EdbShowerP::RemoveSegment() shower->N() " << N() << endl;
356  if (UpdateAll) Update();
357  return;
358 }

◆ Set0()

void EdbShowerP::Set0 ( )
128 {
129  // Default Reseting function:
130  ((EdbSegP*)this)->Set0();
131  eS=0;
132  eVTAS = 0;
133  eNpl=0;
134  eN0=0;
135  eN00=0;
136  //----- start initializing as a photon:
137  eM=0;
138  ePDG=22;
139  //-----
140  eAlgName="UNSPECIFIED";
141  eAlgValue=-999;
142  for (int i=0; i<10; ++i) {
143  eParaValue[i]=-99999.0;
144  eParaString[i]="UNSPECIFIED";
145  }
146  //-----
147  eMC=0;
148  for (int i=0; i<57; i++) {
149  eNBTPlate[i]=0;
150  eNBTMCPlate[i]=0;
151  }
152  eNBTMC=0;
153  eNBT=0;
154  ePurity=0;
155  //-----
156  eId=0;
157  ePDGId=0;
158  eEnergy=0;
161  eEnergyMC=0;
162  //-----
167  eSphericity=0;
172  //-----
173  for (int i=0; i<10; i++) eParametrisationIsDone[i]=kFALSE;
174  for (int i=0; i<2; i++) {
175  eMCInfoIsDone[i]=kFALSE;
176  eExtraInfoIsDone[i]=kFALSE;
177  }
178 
179  // Set0 for the Parametrizations as well:
181  return;
182 }
EdbVTA * eVTAS
track to which the shower start is attached to
Definition: EdbShowerP.h:65
Float_t eEnergyUncorrected
Definition: EdbShowerP.h:109
Float_t eEnergyCorrected
Definition: EdbShowerP.h:110
Float_t eEnergy
Definition: EdbShowerP.h:108
void Set0Parametrizations()
Definition: EdbShowerP.cxx:186
Short_t eId
Definition: EdbShowerP.h:106
Short_t ePDGId
Definition: EdbShowerP.h:107

◆ Set0Parametrizations()

void EdbShowerP::Set0Parametrizations ( )
187 {
188  // Initialize parametrization values with zeroes.
189  // Otherwise, values may be uninitialized and
190  // cause confution:
191 
192  // Para structure: ePara_FJ
194  ePara_FJ.nseg =0;
199  for (int i=0; i<57; ++i) ePara_FJ.longprofile[i]=-1;
200 
201  // Para structure: ePara_LT
203  ePara_LT.nseg =0;
208  for (int i=0; i<8; ++i) ePara_LT.transprofile[i]=-1;
209  for (int i=0; i<57; ++i) ePara_LT.longprofile[i]=-1;
210 
211  // Para structure: ePara_YC ... TO BE DONE ...
212  // Para structure: ePara_JC ... TO BE DONE ...
213 
214  // Para structure: ePara_XX
216  ePara_XX.nseg=0;
225 
226  // Para structure: ePara_YY
229  for (int i=0; i<8; ++i) ePara_YY.ProfileTransversalBincontent[i]=-1;
230  for (int i=0; i<57; ++i) ePara_YY.ProfileLongitudinalBincontent[i]=-1;
231 
232 
233  // Para structure: ePara_PP
235  ePara_PP.nseg=0;
240 
241  // Para structure: ePara_AS
242  ePara_AS.nseg=0;
243  for (int i=0; i<50; ++i) { // only 50 segments are used, remember ...
244  ePara_AS.edIP[i]=0;ePara_AS.edMin[i]=0;
245  ePara_AS.edRLong[i]=0;ePara_AS.edRTrans[i]=0;
247  }
248 
249  // Para structure: ePara_SE
251  ePara_SE.nseg=0;
252  ePara_SE.npl=0;
254 
255  // Para structure: Para_ExtraInfo ... TO BE DONE ...
262 
263  // Para structure: MCInfo_PGun ... TO BE DONE ...
268  eMCInfo_PGun.dirx=0;
269  eMCInfo_PGun.diry=0;
270  eMCInfo_PGun.dirz=0;
274  eMCInfo_PGun.TX=0;
275  eMCInfo_PGun.TY=0;
276  eMCInfo_PGun.X=0;
277  eMCInfo_PGun.Y=0;
278  eMCInfo_PGun.Z=0;
279 
280  // other aras as in the header file listed: ... TO BE DONE ...
281  return;
282 }
for(int i=0;i< nentries;i++)
Definition: check_shower.C:42
Float_t vtxposy
Definition: EdbShowerP.h:283
Float_t vtxposz
Definition: EdbShowerP.h:284
Float_t vtxposx
Definition: EdbShowerP.h:282

◆ SetAlgName()

void EdbShowerP::SetAlgName ( TString  AlgName)
inline
612  {
613  eAlgName=AlgName;
614  }

◆ SetAlgParaString()

void EdbShowerP::SetAlgParaString ( Int_t  ParaStringNr,
TString  ParaString 
)
inline
623  {
624  if (ParaStringNr>=10) return;
625  eParaString[ParaStringNr]=ParaString;
626  }

◆ SetAlgParaValue()

void EdbShowerP::SetAlgParaValue ( Int_t  ParaValueNr,
Float_t  ParaValue 
)
inline
619  {
620  if (ParaValueNr>=10) return;
621  eParaValue[ParaValueNr]=ParaValue;
622  }

◆ SetAlgValue()

void EdbShowerP::SetAlgValue ( Int_t  AlgValue)
inline
615  {
616  eAlgValue=AlgValue;
617  }

◆ SetCounters()

void EdbShowerP::SetCounters ( )
inline
388  {
389  N();
390  SetNpl();
391  SetN0();
392  SetN00();
393  }
void SetN00()
Definition: EdbShowerP.h:418

◆ SetExtraInfoIsDone()

void EdbShowerP::SetExtraInfoIsDone ( Int_t  nr,
Bool_t  IsDone 
)
inline
601  {
602  eExtraInfoIsDone[nr]=IsDone;
603  return;
604  }

◆ SetM()

void EdbShowerP::SetM ( float  m)
inline
462  {
463  eM=m;
464  }

◆ SetMCInfo_Event()

void EdbShowerP::SetMCInfo_Event ( MCInfo_Event  fMCInfo_Event)
inline
608  {
609  eMCInfo_Event=fMCInfo_Event;
610  }

◆ SetMCInfo_PGun()

void EdbShowerP::SetMCInfo_PGun ( MCInfo_PGun  fMCInfo_PGun)
inline
605  {
606  eMCInfo_PGun=fMCInfo_PGun;
607  }

◆ SetMCInfoIsDone()

void EdbShowerP::SetMCInfoIsDone ( Int_t  nr,
Bool_t  IsDone 
)
inline
597  {
598  eMCInfoIsDone[nr]=IsDone;
599  return;
600  }

◆ SetN0() [1/2]

void EdbShowerP::SetN0 ( )
inline
397  {
398  eN0 = eNpl-N();
399  }

◆ SetN0() [2/2]

void EdbShowerP::SetN0 ( int  n0)
inline
394  {
395  eN0 = n0;
396  }

◆ SetN00() [1/2]

void EdbShowerP::SetN00 ( )
inline
418  {
419  eN00 = eNpl-N();
420  }

◆ SetN00() [2/2]

void EdbShowerP::SetN00 ( int  n00)
inline
415  {
416  eN00 = n00;
417  }

◆ SetNpl() [1/2]

void EdbShowerP::SetNpl ( )
inline
406  {
407  if (eS) eNpl = 1+TMath::Abs(GetSegment(0)->PID() - GetSegment(N()-1)->PID());
408  }

◆ SetNpl() [2/2]

void EdbShowerP::SetNpl ( int  npl)
inline
403  {
404  eNpl=npl;
405  }

◆ SetParaVariable()

void EdbShowerP::SetParaVariable ( Float_t  fParVar,
Int_t  ParaVariable,
Int_t  ParaNr 
)
2311 {
2312  Log(3,"EdbShowerP::SetParaVariable()","EdbShowerP::SetParaVariable()");
2313 
2314  // Stupid Workaround to return the parameters of the Parametrizations ....
2315  Log(2,"EdbShowerP::SetParaVariable()","EdbShowerP::SetParaVariable()... Works for now only for ePara_ExtraInfo...!!!");
2316 
2317  if (ParaVariable==4) ePara_ExtraInfo.InBT_IPToVtx=fParVar;
2318  if (ParaVariable==5) ePara_ExtraInfo.InBT_DeltaZToVtx=fParVar;
2319 
2320  return;
2321 }

◆ SetPDG()

void EdbShowerP::SetPDG ( int  pdg)
inline
453  {
454  ePDG=pdg;
455  }

◆ SetSegmentArray()

void EdbShowerP::SetSegmentArray ( TObjArray *  segArray)
inline
491  {
492  eS=segArray;
493  Update();
494  }

◆ Sort()

void EdbShowerP::Sort ( )
363 {
364  // Sort Shower Segments in Ascending Z position:
365  // Makes use of the TSortedList.
366  // EdbTrackP the segment array is already in TSortedList.
367  // In EdbShowerP it is used as a TObjArray thats why we have to make this
368  // turnaround here....
369  TObjArray* array=new TObjArray();
370  TSortedList* f = new TSortedList() ;
371  for (int i=0; i< this->N(); i++) {
372  EdbSegP* sh = this->GetSegment(i);
373  f->Add(sh);
374  }
375  for (int i=0; i< f->GetEntries(); i++) {
376  EdbSegP* sh = (EdbShowerP*)f->At(i);
377  array->Add(sh);
378  }
379  this->SetSegmentArray(array);
380  this->PrintSegments();
381  return;
382 }
FILE * f
Definition: RecDispMC.C:150
Definition: EdbShowerP.h:28
void SetSegmentArray(TObjArray *segArray)
Definition: EdbShowerP.h:491

◆ TrackAS()

EdbTrackP* EdbShowerP::TrackAS ( ) const
inline
377  {
378  return eTrackAS;
379  }
EdbTrackP * eTrackAS
Definition: EdbShowerP.h:64

◆ Update()

void EdbShowerP::Update ( )
976 {
977  Log(3,"EdbShowerP::Update()","Update()");
978  if (eNBT==0) {
979  cout << "Empty shower. Dont Update. return;" << endl;
980  return;
981  }
982 
983  if (this->IsSorted()==kFALSE) Sort();
984  this->BuildNMC();
985  this->BuildShowerAxis();
986  this->BuildProfiles();
987  this->BuildPlateProfile();
988  this->BuildNplN0();
989  this->CalcPurity();
991  Log(3,"EdbShowerP::Update()","Update()...done.");
992 
993  // Maybe we should put the BuildParametrisations right now also in here?
994  // -> Put in UpdateX() if needed to BuildParametrisations
995  return;
996 }
void Sort()
Definition: EdbShowerP.cxx:362
void BuildPlateProfile()
Definition: EdbShowerP.cxx:563
void CalcShowerAngularDeviationDistribution()
Definition: EdbShowerP.cxx:740
void CalcPurity()
Definition: EdbShowerP.cxx:775
void BuildProfiles()
Definition: EdbShowerP.cxx:445
Bool_t IsSorted()
Definition: EdbShowerP.cxx:386
void BuildNMC()
Definition: EdbShowerP.cxx:400

◆ UpdateX()

void EdbShowerP::UpdateX ( )
1001 {
1002  Log(3,"EdbShowerP::UpdateX()","UpdateX() Update() and Build Shower Parametrisations from scratch");
1003  if (eNBT==0) {
1004  cout << "Empty shower. Dont Update. return;" << endl;
1005  return;
1006  }
1007  this->Update();
1008  this->BuildParametrisation(0); // FJ()
1009  this->BuildParametrisation(1); // LT()
1010  this->BuildParametrisation(2); // YC()
1011  this->BuildParametrisation(3); // JC()
1012  this->BuildParametrisation(4); // XX()
1013  this->BuildParametrisation(5); // YY()
1014  //this->BuildParametrisation(6); // PP() // not yet totally finished, needs
1015  // refinement for the e+e-search when BT miss due to scan efficency...
1016  // also angular plane fit still lacking...
1017  this->BuildParametrisation(7); // AS()
1018  this->BuildParametrisation(8); // SE()
1019  Log(3,"EdbShowerP::UpdateX()","UpdateX()...done.");
1020  return;
1021 }
void BuildParametrisation(Int_t ParaNr)
Definition: EdbShowerP.cxx:1190

◆ VTAS()

EdbVTA* EdbShowerP::VTAS ( ) const
inline
380  {
381  return eVTAS;
382  }

Member Data Documentation

◆ eAlgName

TString EdbShowerP::eAlgName
private

◆ eAlgValue

Int_t EdbShowerP::eAlgValue
private

◆ eEnergy

Float_t EdbShowerP::eEnergy
private

◆ eEnergyCorrected

Float_t EdbShowerP::eEnergyCorrected
private

◆ eEnergyMC

Float_t EdbShowerP::eEnergyMC
private

◆ eEnergyUncorrected

Float_t EdbShowerP::eEnergyUncorrected
private

◆ eExtraInfoIsDone

Bool_t EdbShowerP::eExtraInfoIsDone[2]
private

◆ eFirstPlate

Short_t EdbShowerP::eFirstPlate
private

◆ eFirstPlatePID

Short_t EdbShowerP::eFirstPlatePID
private

◆ eFirstPlateZ

Short_t EdbShowerP::eFirstPlateZ
private

◆ eFirstZ

Float_t EdbShowerP::eFirstZ
private

◆ eId

Short_t EdbShowerP::eId
private

◆ eLastPlate

Short_t EdbShowerP::eLastPlate
private

◆ eLastPlatePID

Short_t EdbShowerP::eLastPlatePID
private

◆ eLastPlateZ

Short_t EdbShowerP::eLastPlateZ
private

◆ eLastZ

Float_t EdbShowerP::eLastZ
private

◆ eLongitudinalProfileName

TString EdbShowerP::eLongitudinalProfileName
private

◆ eM

Float_t EdbShowerP::eM
private

vertex to which the shower start is attached to

◆ eMC

Int_t EdbShowerP::eMC
private

◆ eMCInfo_Event

MCInfo_Event EdbShowerP::eMCInfo_Event

◆ eMCInfo_PGun

MCInfo_PGun EdbShowerP::eMCInfo_PGun

◆ eMCInfoIsDone

Bool_t EdbShowerP::eMCInfoIsDone[2]
private

◆ eN0

Int_t EdbShowerP::eN0
private

◆ eN00

Int_t EdbShowerP::eN00
private

◆ eNBT

Int_t EdbShowerP::eNBT
private

◆ eNBTMC

Int_t EdbShowerP::eNBTMC
private

◆ eNBTMCFlag

Int_t EdbShowerP::eNBTMCFlag[99]
private

◆ eNBTMCFlagPlate

Int_t EdbShowerP::eNBTMCFlagPlate[57][99]
private

◆ eNBTMCPlate

Int_t EdbShowerP::eNBTMCPlate[57]
private

◆ eNBTPlate

Int_t EdbShowerP::eNBTPlate[57]
private

◆ eNpl

Int_t EdbShowerP::eNpl
private

◆ ePara_AS

Para_AS EdbShowerP::ePara_AS

◆ ePara_ExtraInfo

Para_ExtraInfo EdbShowerP::ePara_ExtraInfo

◆ ePara_FJ

Para_FJ EdbShowerP::ePara_FJ

◆ ePara_JC

Para_JC EdbShowerP::ePara_JC

◆ ePara_LT

Para_LT EdbShowerP::ePara_LT

◆ ePara_N

Int_t EdbShowerP::ePara_N

◆ ePara_PP

Para_PP EdbShowerP::ePara_PP

◆ ePara_SE

Para_SE EdbShowerP::ePara_SE

◆ ePara_XX

Para_XX EdbShowerP::ePara_XX

◆ ePara_YC

Para_YC EdbShowerP::ePara_YC

◆ ePara_YY

Para_YY EdbShowerP::ePara_YY

◆ eParametrisationIsDone

Bool_t EdbShowerP::eParametrisationIsDone[10]
private

◆ eParaString

TString EdbShowerP::eParaString[10]
private

◆ eParaValue

Float_t EdbShowerP::eParaValue[10]
private

◆ ePDG

Int_t EdbShowerP::ePDG
private

◆ ePDGId

Short_t EdbShowerP::ePDGId
private

◆ eProfileLongitudinal

TH1F* EdbShowerP::eProfileLongitudinal
private

◆ eProfileTransversal

TH1F* EdbShowerP::eProfileTransversal
private

◆ ePurity

Float_t EdbShowerP::ePurity
private

◆ eReco_E

Reco_E EdbShowerP::eReco_E

◆ eReco_E_Array

TObjArray* EdbShowerP::eReco_E_Array

◆ eReco_ID_Array

TObjArray* EdbShowerP::eReco_ID_Array

◆ eReco_Vtx

Reco_Vtx EdbShowerP::eReco_Vtx

◆ eReco_Vtx_Array

TObjArray* EdbShowerP::eReco_Vtx_Array

◆ eS

TObjArray* EdbShowerP::eS
private

◆ eShowerAngularDeviationTXDistribution_mean

Float_t EdbShowerP::eShowerAngularDeviationTXDistribution_mean
private

◆ eShowerAngularDeviationTXDistribution_sigma

Float_t EdbShowerP::eShowerAngularDeviationTXDistribution_sigma
private

◆ eShowerAngularDeviationTYDistribution_mean

Float_t EdbShowerP::eShowerAngularDeviationTYDistribution_mean
private

◆ eShowerAngularDeviationTYDistribution_sigma

Float_t EdbShowerP::eShowerAngularDeviationTYDistribution_sigma
private

◆ eShowerAxisAngle

Float_t EdbShowerP::eShowerAxisAngle
private

◆ eShowerAxisCenterGravityBT

EdbSegP* EdbShowerP::eShowerAxisCenterGravityBT
private

◆ eSphericity

Float_t EdbShowerP::eSphericity
private

◆ eTrackAS

EdbTrackP* EdbShowerP::eTrackAS
private

◆ eTransversalProfileName

TString EdbShowerP::eTransversalProfileName
private

◆ eVTAS

EdbVTA* EdbShowerP::eVTAS
private

track to which the shower start is attached to


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