FairRoot/PandaRoot
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
PndDrc Class Reference

#include <PndDrc.h>

Inheritance diagram for PndDrc:

Public Member Functions

 PndDrc ()
 
 PndDrc (const char *name, Bool_t active)
 
virtual ~PndDrc ()
 
void StopSecondaries (Bool_t ss=kFALSE)
 Kill secondaries at its production point. More...
 
void StopChargedTrackAfterDIRC (Bool_t sctad=kTRUE)
 Kill charged track by exiting the DIRC to avoid it hitting the large EV. More...
 
void SetDetEffAtProduction (Bool_t dep=kFALSE)
 Kill photons at production point according to the detector efficiency distribution. More...
 
void SetTransportEffAtProduction (Bool_t tra=kFALSE)
 Kill photons at production point according to the transport efficiency distribution. More...
 
void SetMirrorReal (Bool_t mir=kTRUE)
 Choose between ideal and real mirror: More...
 
void SetBlackLensSides (Bool_t lesi=kFALSE)
 
void SetStopTime (Double_t ti=-1.)
 Set time after which photons are killed. More...
 
void SetOptionForLUT (Bool_t oplu=kFALSE)
 
virtual void Initialize ()
 
void SetPersistency (Bool_t v=kTRUE)
 
virtual Bool_t ProcessHits (FairVolume *vol=0)
 
virtual void FinishPrimary ()
 
virtual void EndOfEvent ()
 
virtual void BeginEvent ()
 
virtual void Register ()
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 
virtual void Print () const
 
virtual void Reset ()
 
virtual void CopyClones (TClonesArray *clPD1, TClonesArray *clPD2, TClonesArray *clBar1, TClonesArray *clBar2, Int_t offset)
 
void FinishRun ()
 
virtual void ConstructGeometry ()
 
virtual void ConstructOpGeometry ()
 
bool CheckIfSensitive (std::string name)
 
void NumberOfBounces (TVector3, TVector3, Int_t, Int_t *, Int_t *, Double_t *, Double_t *)
 
Double_t FindOutPoint (Double_t, Double_t, Double_t, Double_t *, Bool_t)
 
PndDrcPDPointAddHit (Int_t trackID, Int_t copyNo, Int_t mcpId, TVector3 pos, TVector3 mom, TVector3 momAtEV, Double_t timeAtEV, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID)
 
PndDrcEVPointAddEVHit (Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID, Double_t timestart, Double_t timestartEV, Double_t VeloPhoton, TVector3 normal)
 
PndDrcBarPointAddBarHit (Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Double_t thetaC, Int_t nBar, Int_t eventID, Double_t mass)
 
void SetRunCherenkov (Bool_t ch)
 

Public Attributes

std::vector< std::string > fListOfSensitives
 

Private Member Functions

void ResetParameters ()
 

Private Attributes

Bool_t fPersistency
 
Double_t fpi
 
Double_t fzup
 
Double_t fzdown
 
Double_t fradius
 
Double_t fhthick
 
Double_t fpipehAngle
 
Double_t fbbGap
 
Double_t fbbnum
 
Double_t fbarnum
 
Double_t fphi0
 
Double_t fdphi
 
Double_t fbarwidth
 
PndGeoHandlingfGeoH
 
Bool_t fRunCherenkov
 ///< converter for detector names More...
 
Int_t fTrackID
 Switch ON/OFF Cherenkov propagation. More...
 
Int_t fBarId
 track index More...
 
TLorentzVector fPos
 
TLorentzVector fMom
 position More...
 
Double32_t fTime
 momentum More...
 
Double32_t fLength
 time More...
 
Double32_t fLengthEV
 length More...
 
Double_t fAngIn
 
Int_t fNBar
 
Int_t fPosIndex
 
Int_t volDetector
 
Double_t fMass
 MC volume ID of drc. More...
 
TLorentzVector fMomAtEV
 
Double_t fTimeAtEV
 
Double_t fTimeAtEVEntrance
 
Double_t fTimeStart
 
Double_t fVeloPhoton
 
Double_t fEfficiencyR [1000]
 
Int_t fEVreflections
 
TGraph * fDetEff
 
Bool_t fDetEffAtProduction
 Detector Efficiency as a function of photon wavelength. More...
 
Bool_t fTransportEffAtProduction
 
TRandom3 fRand
 
Double_t fCollectionEff
 
Bool_t fStopTime
 
Double_t fPhoMaxTime
 
Bool_t fTakeRealReflectivity
 
Bool_t fStopSecondaries
 
Bool_t fStopChargedTrackAfterDIRC
 
Bool_t fSetBlackLens
 
Bool_t fOptionForLUT
 
PndGeoDrcfGeo
 
Int_t fPdgCode
 Pointer to basic DRC geometry data. More...
 
Double_t fThetaC
 
TClonesArray * fDrcPDCollection
 
TClonesArray * fDrcEVCollection
 Hit collection. More...
 
TClonesArray * fDrcBarCollection
 Hit collection. More...
 
Int_t fEventID
 Hit collection in the bar. More...
 

Detailed Description

Definition at line 31 of file PndDrc.h.

Constructor & Destructor Documentation

PndDrc::PndDrc ( )

Default constructor

Definition at line 67 of file PndDrc.cxx.

References fGeoH, fListOfSensitives, and PndGeoHandling::Instance().

68  : FairDetector("PndDrcDefault",kTRUE),
69  fPersistency(kTRUE),
70  fpi(TMath::Pi()),
71  fzup(-999.),
72  fzdown(-999.),
73  fradius(-999.),
74  fhthick(-999.),
75  fpipehAngle(-999.),
76  fbbGap(-999.),
77  fbbnum(-999.),
78  fbarnum(-999.),
79  fphi0(-999.),
80  fdphi(-999.),
81  fbarwidth(-999.),
82 
83  fGeoH(NULL),
84 
85  fRunCherenkov(kTRUE),
86  fTrackID(-1),
87  fPos(TLorentzVector(0,0,0,0)),
88  fMom(TLorentzVector(0,0,0,0)),
89  fTime(-1),
90  fLength(-1),
91  fAngIn(0),
92  fNBar(0),
93  fPosIndex(-1),
94  volDetector(0),
95  fMass(-1),
96 
97  fDetEff(0x0),
98  fDetEffAtProduction(kFALSE),
100  fRand(),
101  fCollectionEff(-1),//Collection Efficiency
102 
103  fStopTime(kFALSE),
104  fPhoMaxTime(-1),
105 
106  fTakeRealReflectivity(kFALSE),
107  fStopSecondaries(kFALSE),
109  fGeo(new PndGeoDrc()),
110 
111  fPdgCode(-1),
112  fThetaC(-1),
113 
114  fDrcPDCollection(new TClonesArray("PndDrcPDPoint")),
115  fDrcEVCollection(new TClonesArray("PndDrcEVPoint")),
116  fDrcBarCollection (new TClonesArray("PndDrcBarPoint")),
117  fEventID(0)
118 {
119  fListOfSensitives.push_back("Sensor");
120  if(fVerboseLevel > 0){
121  std::cout<<"-I- PndBarrelDIRC: fListOfSensitives contains:";
122  for(size_t k=0; k<fListOfSensitives.size(); k++)
123  std::cout<<"\n\t"<<fListOfSensitives[k];
124  std::cout<<std::endl;
125  }
126 
127  if(fGeoH == NULL) fGeoH = PndGeoHandling::Instance();
128 }
Double_t x0
Definition: checkhelixhit.C:70
Double_t fpipehAngle
Definition: PndDrc.h:234
Double_t fzdown
Definition: PndDrc.h:231
Double_t fbarwidth
Definition: PndDrc.h:241
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
Double_t fzup
Definition: PndDrc.h:230
Bool_t fStopTime
Definition: PndDrc.h:274
Double_t fPhoMaxTime
Definition: PndDrc.h:275
Bool_t fTransportEffAtProduction
Definition: PndDrc.h:270
TLorentzVector fMom
position
Definition: PndDrc.h:249
Double_t fbbGap
Definition: PndDrc.h:235
Bool_t fPersistency
Definition: PndDrc.h:222
Double32_t fTime
momentum
Definition: PndDrc.h:250
Int_t fTrackID
Switch ON/OFF Cherenkov propagation.
Definition: PndDrc.h:246
TRandom3 fRand
Definition: PndDrc.h:271
Double_t fMass
MC volume ID of drc.
Definition: PndDrc.h:257
Double_t fCollectionEff
Definition: PndDrc.h:272
Double32_t fLength
time
Definition: PndDrc.h:251
TLorentzVector fPos
Definition: PndDrc.h:248
Bool_t fRunCherenkov
///< converter for detector names
Definition: PndDrc.h:245
Double_t fphi0
Definition: PndDrc.h:239
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TGraph * fDetEff
Definition: PndDrc.h:268
Double_t fdphi
Definition: PndDrc.h:240
Int_t fEventID
Hit collection in the bar.
Definition: PndDrc.h:291
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
Int_t fPdgCode
Pointer to basic DRC geometry data.
Definition: PndDrc.h:284
Double_t fAngIn
Definition: PndDrc.h:253
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
static PndGeoHandling * Instance()
PndGeoDrc * fGeo
Definition: PndDrc.h:282
Bool_t fStopSecondaries
Definition: PndDrc.h:277
Bool_t fTakeRealReflectivity
Definition: PndDrc.h:276
Double_t fThetaC
Definition: PndDrc.h:285
Double_t fbarnum
Definition: PndDrc.h:238
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
std::vector< std::string > fListOfSensitives
Definition: PndDrc.h:179
Double_t fpi
Definition: PndDrc.h:229
Bool_t fStopChargedTrackAfterDIRC
Definition: PndDrc.h:278
Double_t fhthick
Definition: PndDrc.h:233
Int_t fNBar
Definition: PndDrc.h:254
Int_t fPosIndex
Definition: PndDrc.h:255
Int_t volDetector
Definition: PndDrc.h:256
Double_t Pi
Double_t fradius
Definition: PndDrc.h:232
Double_t fbbnum
Definition: PndDrc.h:237
PndDrc::PndDrc ( const char *  name,
Bool_t  active 
)

Standard constructor.

Parameters
namedetetcor name
activesensitivity flag

Definition at line 131 of file PndDrc.cxx.

References fGeoH, fListOfSensitives, and PndGeoHandling::Instance().

132  : FairDetector(name, active),
133  fPersistency(kTRUE),
134  fpi(TMath::Pi()),
135  fzup(-999.),
136  fzdown(-999.),
137  fradius(-999.),
138  fhthick(-999.),
139  fpipehAngle(-999.),
140  fbbGap(-999.),
141  fbbnum(-999.),
142  fbarnum(-999.),
143  fphi0(-999.),
144  fdphi(-999.),
145  fbarwidth(-999.),
146 
147  fGeoH(NULL),
148 
149  fRunCherenkov(kTRUE),
150  fTrackID(-1),
151  fPos(TLorentzVector(0,0,0,0)),
152  fMom(TLorentzVector(0,0,0,0)),
153  fTime(-1),
154  fLength(-1),
155  fAngIn(0),
156  fNBar(0),
157  fPosIndex(-1),
158  volDetector(0),
159  fMass(-1),
160 
161  fDetEff(0x0),
162  fDetEffAtProduction(kFALSE),
164  fRand(),
165  fCollectionEff(-1),//Collection Efficiency
166 
167  fStopTime(kFALSE),
168  fPhoMaxTime(-1),
169 
170  fTakeRealReflectivity(kFALSE),
171  fStopSecondaries(kFALSE),
172 
174  fGeo(new PndGeoDrc()),
175 
176  fPdgCode(-1),
177  fThetaC(-1),
178 
179  fDrcPDCollection(new TClonesArray("PndDrcPDPoint")),
180  fDrcEVCollection(new TClonesArray("PndDrcEVPoint")),
181  fDrcBarCollection (new TClonesArray("PndDrcBarPoint")),
182  fEventID(0)
183 {
184  fListOfSensitives.push_back("Sensor");
185  if(fVerboseLevel > 0){
186  std::cout<<"-I- PndBarrelDIRC: fListOfSensitives contains:";
187  for(size_t k=0; k<fListOfSensitives.size(); k++)
188  std::cout<<"\n\t"<<fListOfSensitives[k];
189  std::cout<<std::endl;
190  }
191 
192  if(fGeoH == NULL) fGeoH = PndGeoHandling::Instance();
193 
194 }
Double_t x0
Definition: checkhelixhit.C:70
Double_t fpipehAngle
Definition: PndDrc.h:234
Double_t fzdown
Definition: PndDrc.h:231
Double_t fbarwidth
Definition: PndDrc.h:241
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
Double_t fzup
Definition: PndDrc.h:230
Bool_t fStopTime
Definition: PndDrc.h:274
Double_t fPhoMaxTime
Definition: PndDrc.h:275
Bool_t fTransportEffAtProduction
Definition: PndDrc.h:270
TLorentzVector fMom
position
Definition: PndDrc.h:249
Double_t fbbGap
Definition: PndDrc.h:235
Bool_t fPersistency
Definition: PndDrc.h:222
Double32_t fTime
momentum
Definition: PndDrc.h:250
Int_t fTrackID
Switch ON/OFF Cherenkov propagation.
Definition: PndDrc.h:246
TRandom3 fRand
Definition: PndDrc.h:271
Double_t fMass
MC volume ID of drc.
Definition: PndDrc.h:257
Double_t fCollectionEff
Definition: PndDrc.h:272
Double32_t fLength
time
Definition: PndDrc.h:251
TLorentzVector fPos
Definition: PndDrc.h:248
Bool_t fRunCherenkov
///< converter for detector names
Definition: PndDrc.h:245
Double_t fphi0
Definition: PndDrc.h:239
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TGraph * fDetEff
Definition: PndDrc.h:268
Double_t fdphi
Definition: PndDrc.h:240
Int_t fEventID
Hit collection in the bar.
Definition: PndDrc.h:291
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
Int_t fPdgCode
Pointer to basic DRC geometry data.
Definition: PndDrc.h:284
Double_t fAngIn
Definition: PndDrc.h:253
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
static PndGeoHandling * Instance()
TString name
PndGeoDrc * fGeo
Definition: PndDrc.h:282
Bool_t fStopSecondaries
Definition: PndDrc.h:277
Bool_t fTakeRealReflectivity
Definition: PndDrc.h:276
Double_t fThetaC
Definition: PndDrc.h:285
Double_t fbarnum
Definition: PndDrc.h:238
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
std::vector< std::string > fListOfSensitives
Definition: PndDrc.h:179
Double_t fpi
Definition: PndDrc.h:229
Bool_t fStopChargedTrackAfterDIRC
Definition: PndDrc.h:278
Double_t fhthick
Definition: PndDrc.h:233
Int_t fNBar
Definition: PndDrc.h:254
Int_t fPosIndex
Definition: PndDrc.h:255
Int_t volDetector
Definition: PndDrc.h:256
Double_t Pi
Double_t fradius
Definition: PndDrc.h:232
Double_t fbbnum
Definition: PndDrc.h:237
PndDrc::~PndDrc ( )
virtual

Destructor

Definition at line 197 of file PndDrc.cxx.

References fDrcBarCollection, fDrcEVCollection, fDrcPDCollection, and fGeo.

197  {
198  if (fDrcPDCollection) {
199  fDrcPDCollection->Delete();
200  delete fDrcPDCollection;
201  }
202 
203  if (fDrcEVCollection) {
204  fDrcEVCollection->Delete();
205  delete fDrcEVCollection;
206  }
207 
208  if (fDrcBarCollection) {
209  fDrcBarCollection->Delete();
210  delete fDrcBarCollection;
211  }
212 
213  if (fGeo) delete fGeo;
214 
215 }
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
PndGeoDrc * fGeo
Definition: PndDrc.h:282

Member Function Documentation

PndDrcBarPoint * PndDrc::AddBarHit ( Int_t  trackID,
Int_t  copyNo,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Int_t  pdgCode,
Double_t  thetaC,
Int_t  nBar,
Int_t  eventID,
Double_t  mass 
)

Definition at line 896 of file PndDrc.cxx.

References fDrcBarCollection.

Referenced by ProcessHits().

896  {
897  TClonesArray& clrefBar = *fDrcBarCollection;
898  Int_t size = clrefBar.GetEntriesFast();
899  if (fVerboseLevel>1)
900  cout << "-I- PndBarDrc: Adding Bar Point at (" << pos.X() << ", " << pos.Y()
901  << ", " << pos.Z() << ") cm, detector " << copyNo << ", track "
902  << trackID <<" event "<<eventID << " PDG "<<pdgCode<< endl;
903  return new(clrefBar[size]) PndDrcBarPoint(trackID,
904  copyNo,
905  pos,
906  mom,
907  time,
908  length,
909  pdgCode,
910  thetaC,
911  BarId,
912  eventID,
913  mass);
914 }
TVector3 pos
Double_t mom
Definition: plot_dirc.C:14
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
Double_t thetaC
Definition: plot_dirc.C:16
PndDrcEVPoint * PndDrc::AddEVHit ( Int_t  trackID,
Int_t  copyNo,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Int_t  pdgCode,
Int_t  eventID,
Double_t  timestart,
Double_t  timestartEV,
Double_t  VeloPhoton,
TVector3  normal 
)

Definition at line 875 of file PndDrc.cxx.

References fDrcEVCollection.

Referenced by ProcessHits().

875  {
876  TClonesArray& clrefEV = *fDrcEVCollection;
877  Int_t size = clrefEV.GetEntriesFast();
878  if (fVerboseLevel>2)
879  cout << "-I- PndDrc: Adding EV Point at (" << pos.X() << ", " << pos.Y()
880  << ", " << pos.Z() << ") cm, detector " << copyNo << ", track "
881  << trackID <<" event "<<eventID << endl;
882  return new(clrefEV[size]) PndDrcEVPoint(trackID,
883  copyNo,
884  pos,
885  mom,
886  time,
887  length,
888  pdgCode,
889  eventID,
890  timestart,
891  timestartEV,
892  VeloPhoton,normal);
893 
894 }
TVector3 pos
Double_t mom
Definition: plot_dirc.C:14
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
PndDrcPDPoint * PndDrc::AddHit ( Int_t  trackID,
Int_t  copyNo,
Int_t  mcpId,
TVector3  pos,
TVector3  mom,
TVector3  momAtEV,
Double_t  timeAtEV,
Double_t  time,
Double_t  length,
Int_t  pdgCode,
Int_t  eventID 
)

Definition at line 853 of file PndDrc.cxx.

References fDrcBarCollection, fDrcPDCollection, mom, and pos.

Referenced by ProcessHits().

853  {
854  TClonesArray& clrefPD = *fDrcPDCollection;
855  Int_t size = clrefPD.GetEntriesFast();
856  if (fVerboseLevel>1)
857  cout << "-I- PndDrc: Adding PD Point at (" << pos.X() << ", " << pos.Y()
858  << ", " << pos.Z() << ") cm, detector " << copyNo << ", track "
859  << trackID <<" event "<<eventID << " barId "<< fDrcBarCollection->GetEntriesFast()-1 <<endl;
860  return new(clrefPD[size]) PndDrcPDPoint(trackID,
861  copyNo,
862  mcpId,
863  fDrcBarCollection->GetEntriesFast()-1,
864  pos,
865  mom,
866  momAtEV,
867  timeAtEV,
868  time,
869  length,
870  pdgCode,
871  eventID);
872 
873 }
TVector3 pos
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
Double_t mom
Definition: plot_dirc.C:14
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
void PndDrc::BeginEvent ( )
virtual

Definition at line 283 of file PndDrc.cxx.

References fEventID.

283  {
284  if (fVerboseLevel >0) cout<<" \n\n>>>>>>>>>>>>>>>>>>>>new event in the Barrel DIRC" <<endl;
285  fEventID++;
286 }
Int_t fEventID
Hit collection in the bar.
Definition: PndDrc.h:291
bool PndDrc::CheckIfSensitive ( std::string  name)

Definition at line 844 of file PndDrc.cxx.

References fListOfSensitives, and i.

844  {
845  for (size_t i = 0; i < fListOfSensitives.size(); i++){
846  if (name.find(fListOfSensitives[i]) != std::string::npos)
847  return true;
848  }
849  return false;
850 }
Int_t i
Definition: run_full.C:25
TString name
std::vector< std::string > fListOfSensitives
Definition: PndDrc.h:179
void PndDrc::ConstructGeometry ( )
virtual

Virtual method Construct geometry

Definition at line 663 of file PndDrc.cxx.

References TString.

663  {
664  cout<< " " << endl;
665  cout<< " ======= DRC:: ConstructGeometry() ======== " << endl;
666  cout<< " ============================================= " << endl;
667 
668  TString fileName = GetGeometryFileName();
669  if(fileName.EndsWith(".root")){
670  ConstructRootGeometry();
671  } else{
672  std::cout<<"Geometry format not supported!"<<std::endl;
673  }
674 
675  cout<< " ============================================= " << endl;
676 }
void PndDrc::ConstructOpGeometry ( )
virtual

Definition at line 679 of file PndDrc.cxx.

References Double_t, fSetBlackLens, fTakeRealReflectivity, and i.

679  {
680  cout<< " ==================================================== " << endl;
681  cout<< " ======= DRC:: ConstructOpticalGeometry() ======== " << endl;
682 
683  // ideal reflectivity:
684  Int_t npoints_i = 2;
685  Double_t ephoton_i[npoints_i];
686  ephoton_i[0] = 1.907*1.0e-09; // 1 eV
687  ephoton_i[1] = 6.199*1.0e-09; // 10 eV
688  Double_t reflectivity_i[npoints_i];
689  reflectivity_i[0] = 1.;
690  reflectivity_i[1] = 1.;
691 
692  // black reflectivity:
693  Double_t reflectivity_b[npoints_i];
694  reflectivity_b[0] = 0.;
695  reflectivity_b[1] = 0.;
696 
697  // real reflectivity (added 18.05.2011, measured by Jerry for BABAR):
698  Int_t npoints_r = 46;
699  Double_t ephoton_r[npoints_r];
700  ephoton_r[0] = 1.907*1.0e-09; //eV
701  ephoton_r[1] = 1.937*1.0e-09;
702  ephoton_r[2] = 1.968*1.0e-09;
703  ephoton_r[3] = 2.000*1.0e-09;
704  ephoton_r[4] = 2.033*1.0e-09;
705  ephoton_r[5] = 2.066*1.0e-09;
706  ephoton_r[6] = 2.101*1.0e-09;
707  ephoton_r[7] = 2.138*1.0e-09;
708  ephoton_r[8] = 2.175*1.0e-09;
709  ephoton_r[9] = 2.214*1.0e-09;
710  ephoton_r[10] = 2.254*1.0e-09;
711  ephoton_r[11] = 2.296*1.0e-09;
712  ephoton_r[12] = 2.339*1.0e-09;
713  ephoton_r[13] = 2.384*1.0e-09;
714  ephoton_r[14] = 2.431*1.0e-09;
715  ephoton_r[15] = 2.480*1.0e-09;
716  ephoton_r[16] = 2.530*1.0e-09;
717  ephoton_r[17] = 2.583*1.0e-09;
718  ephoton_r[18] = 2.638*1.0e-09;
719  ephoton_r[19] = 2.695*1.0e-09;
720  ephoton_r[20] = 2.755*1.0e-09;
721  ephoton_r[21] = 2.818*1.0e-09;
722  ephoton_r[22] = 2.883*1.0e-09;
723  ephoton_r[23] = 2.952*1.0e-09;
724  ephoton_r[24] = 3.024*1.0e-09;
725  ephoton_r[25] = 3.100*1.0e-09;
726  ephoton_r[26] = 3.179*1.0e-09;
727  ephoton_r[27] = 3.263*1.0e-09;
728  ephoton_r[28] = 3.351*1.0e-09;
729  ephoton_r[29] = 3.444*1.0e-09;
730  ephoton_r[30] = 3.542*1.0e-09;
731  ephoton_r[31] = 3.647*1.0e-09;
732  ephoton_r[32] = 3.757*1.0e-09;
733  ephoton_r[33] = 3.875*1.0e-09;
734  ephoton_r[34] = 3.999*1.0e-09;
735  ephoton_r[35] = 4.133*1.0e-09;
736  ephoton_r[36] = 4.275*1.0e-09;
737  ephoton_r[37] = 4.428*1.0e-09;
738  ephoton_r[38] = 4.592*1.0e-09;
739  ephoton_r[39] = 4.769*1.0e-09;
740  ephoton_r[40] = 4.959*1.0e-09;
741  ephoton_r[41] = 5.166*1.0e-09;
742  ephoton_r[42] = 5.391*1.0e-09;
743  ephoton_r[43] = 5.636*1.0e-09;
744  ephoton_r[44] = 5.904*1.0e-09;
745  ephoton_r[45] = 6.199*1.0e-09;
746 
747  Double_t reflectivity_r[npoints_r];
748  reflectivity_r[0] = 0.870;
749  reflectivity_r[1] = 0.880;
750  reflectivity_r[2] = 0.885;
751  reflectivity_r[3] = 0.890;
752  reflectivity_r[4] = 0.895;
753  reflectivity_r[5] = 0.900;
754  reflectivity_r[6] = 0.905;
755  reflectivity_r[7] = 0.910;
756  reflectivity_r[8] = 0.915;
757  reflectivity_r[9] = 0.920;
758  reflectivity_r[10] = 0.923;
759  reflectivity_r[11] = 0.925;
760  reflectivity_r[12] = 0.926;
761  reflectivity_r[13] = 0.928;
762  reflectivity_r[14] = 0.930;
763  reflectivity_r[15] = 0.935;
764  reflectivity_r[16] = 0.936;
765  reflectivity_r[17] = 0.937;
766  reflectivity_r[18] = 0.938;
767  reflectivity_r[19] = 0.940;
768  reflectivity_r[20] = 0.940;
769  reflectivity_r[21] = 0.939;
770  reflectivity_r[22] = 0.938;
771  reflectivity_r[23] = 0.938;
772  reflectivity_r[24] = 0.937;
773  reflectivity_r[25] = 0.937;
774  reflectivity_r[26] = 0.936;
775  reflectivity_r[27] = 0.935;
776  reflectivity_r[28] = 0.934;
777  reflectivity_r[29] = 0.932;
778  reflectivity_r[30] = 0.930;
779  reflectivity_r[31] = 0.928;
780  reflectivity_r[32] = 0.926;
781  reflectivity_r[33] = 0.924;
782  reflectivity_r[34] = 0.922;
783  reflectivity_r[35] = 0.920;
784  reflectivity_r[36] = 0.910;
785  reflectivity_r[37] = 0.905;
786  reflectivity_r[38] = 0.895;
787  reflectivity_r[39] = 0.890;
788  reflectivity_r[40] = 0.885;
789  reflectivity_r[41] = 0.860;
790  reflectivity_r[42] = 0.840;
791  reflectivity_r[43] = 0.820;
792  reflectivity_r[44] = 0.800;
793  reflectivity_r[45] = 0.780;
794 
795  gMC->DefineOpSurface("LensSurface", kGlisur, kDielectric_dielectric, kGround, 0.0);
796  gMC->DefineOpSurface("MirrSurface", kGlisur, kDielectric_metal, kPolished, 0.0);
797  gMC->DefineOpSurface("EVSurface", kGlisur, kDielectric_metal, kPolished, 0.0);
798  gMC->DefineOpSurface("BlackSurface", kGlisur, kDielectric_dielectric, kPolished, 0.0);
799 
800 
801  // Double_t refractiveIndex[npoints_i];
802  // refractiveIndex[0] = 1.2;
803  // refractiveIndex[1] = 1.2;
804  // Double_t abs_i[npoints_i];
805  // abs_i[0] = 1000.;
806  // abs_i[1] = 1000.;
807 
808  // // gMC->SetCerenkov(gMC->MediumId("BK7G18"),npoints_i, ephoton_i,abs_i , reflectivity_i, refractiveIndex);
809 
810  // gMC->SetMaterialProperty("LensSurface", "RINDEX", npoints_i, ephoton_i, refractiveIndex);
811  // gMC->SetMaterialProperty("LensSurface", "REFLECTIVITY", npoints_i, ephoton_i, reflectivity_i);
812  // gMC->SetSkinSurface("Lens3Sur", "DrcLENS3Sensor", "LensSurface");
813  // return;
814 
815  gMC->SetMaterialProperty("BlackSurface", "REFLECTIVITY", npoints_i, ephoton_i, reflectivity_b);
816 
817  if(fTakeRealReflectivity == kFALSE){
818  gMC->SetMaterialProperty("MirrSurface", "REFLECTIVITY", npoints_i, ephoton_i, reflectivity_i);
819  }else{
820  gMC->SetMaterialProperty("MirrSurface", "REFLECTIVITY", npoints_r, ephoton_r, reflectivity_r);
821  }
822 
823  gMC->SetBorderSurface("BarMirrorSurface", "DrcMirror", 0, "DrcBarBoxAir", 0, "MirrSurface");
824 
825  if(fSetBlackLens == kTRUE){
826  for(Int_t i=0; i<3; i++){ //fGeo->barNum()
827  gMC->SetBorderSurface("Lens1AirSurface", "DrcLENS1Sensor", i, "DrcEntrance", 0, "BlackSurface");
828  gMC->SetBorderSurface("Lens2AirSurface", "DrcLENS2Sensor", i, "DrcEntrance", 0, "BlackSurface");
829  //gMC->SetBorderSurface("Lens3AirSurface", "DrcLENS3Sensor", i, "DrcEntrance", 0, "BlackSurface");
830  }
831  //gMC->SetBorderSurface("BarboxWindowAirSurface", "DrcBarboxWindowSensor", 0, "BarrelDIRC", 0, "EVSurface");
832  //gMC->SetBorderSurface("EVGreaseAirSurface", "DrcEVgrease", 0, "BarrelDIRC", 0, "EVSurface");
833  }
834 
835  //only direct
836  //gMC->SetBorderSurface("EVAirSurface", "DrcEVSensor", 0, "DrcEVCoverSensor", 0, "BlackSurface");
837 
838  gMC->SetSkinSurface("AirMirrorSurface", "DrcMirror", "MirrSurface");
839 
840  cout<<" ======= DRC::ConstructOpGeometry -> Finished! ====== "<< endl;
841 }
Int_t i
Definition: run_full.C:25
Double_t
Bool_t fTakeRealReflectivity
Definition: PndDrc.h:276
Bool_t fSetBlackLens
Definition: PndDrc.h:279
void PndDrc::CopyClones ( TClonesArray *  clPD1,
TClonesArray *  clPD2,
TClonesArray *  clBar1,
TClonesArray *  clBar2,
Int_t  offset 
)
virtual

Virtual method CopyClones

Copies the hit collection with a given track index offset

Parameters
cl1Origin
cl2Target
offsetIndex offset

Definition at line 630 of file PndDrc.cxx.

References fPosIndex, i, and offset().

630  {
631  Int_t nPDEntries = clPD1->GetEntriesFast();
632  cout << "-I- PndDrc: " << nPDEntries << " entries to add." << endl;
633  TClonesArray& clrefPD = *clPD2;
634 
635  Int_t nBarEntries = clBar1->GetEntriesFast();
636  cout << "-I- PndDrc: " << nBarEntries << " entries to add." << endl;
637  TClonesArray& clrefBar = *clBar2;
638 
639  PndDrcPDPoint* oldpointPD = NULL;
640  PndDrcBarPoint* oldpointBar = NULL;
641 
642  for (Int_t i=0; i<nPDEntries; i++) {
643  oldpointPD = (PndDrcPDPoint*) clPD1->At(i);
644  Int_t indexPD = oldpointPD->GetTrackID() + offset;
645  oldpointPD->SetTrackID(indexPD);
646  new (clrefPD[fPosIndex]) PndDrcPDPoint(*oldpointPD);
647  fPosIndex++;
648  }
649 
650  for (Int_t i=0; i<nBarEntries; i++) {
651  oldpointBar = (PndDrcBarPoint*) clBar1->At(i);
652  Int_t indexBar = oldpointBar->GetTrackID() + offset;
653  oldpointBar->SetTrackID(indexBar);
654  new (clrefBar[fPosIndex]) PndDrcBarPoint(*oldpointBar);
655  fPosIndex++;
656  }
657 
658  cout << " -I- PndDrc: " << clPD2->GetEntriesFast() << " merged entries." << endl;
659  cout << " -I- PndDrc: " << clBar2->GetEntriesFast() << " merged entries." << endl;
660 }
Int_t i
Definition: run_full.C:25
TVector3 offset(2, 0, 0)
Int_t fPosIndex
Definition: PndDrc.h:255
void PndDrc::EndOfEvent ( )
virtual

Virtual method EndOfEvent

If verbosity level is set, print hit collection at the end of the event and resets it afterwards.

Definition at line 579 of file PndDrc.cxx.

References Print(), and Reset().

579  {
580  if (fVerboseLevel) Print();
581  Reset();
582 }
virtual void Reset()
Definition: PndDrc.cxx:622
virtual void Print() const
Definition: PndDrc.cxx:605
Double_t PndDrc::FindOutPoint ( Double_t  x0,
Double_t  xEn,
Double_t  a,
Double_t NN,
Bool_t  print 
)

Definition at line 545 of file PndDrc.cxx.

References a, Double_t, m, and n.

Referenced by NumberOfBounces().

545  {
546  Double_t m=99.;
547  Double_t n=TMath::Floor(x0/a);
548  m = n;
549  if(print){std::cout<<"n = "<<n<<", NN = "<<*NN<<", x0 = "<<x0<<", a = "<<a<<std::endl;}
550  Double_t x1 = x0 - n*a;
551  if(x0 < 0.){x1 = x0 - (n+1)*a;}
552  if(print){std::cout<<"xy = "<< x1<<std::endl;}
553  Double_t xK = 0.;
554  if((m/2. - TMath::Floor(m/2.)) == 0.) { // 4etnoe
555  if(print){std::cout<<"odd==0"<<std::endl;}
556  if(x0 >= 0. && x1 + xEn <= a){xK = x1 + xEn;}
557  if(x0 >= 0. && x1 + xEn > a){xK = 2*a - x1 - xEn; n = 1. + n;}
558  if(x0 < 0. && x1 + xEn >= 0.){xK = a - (x1 + xEn); n = -1. -n;}
559  if(x0 < 0. && x1 + xEn < 0.) {xK = a + x1 + xEn; n = -n;}
560  if(print){std::cout<<"xK = "<< xK<<", n = "<<n<<std::endl;}
561 
562  }
563 
564  if((m/2. - TMath::Floor(m/2.)) != 0.) { // ne4etnoe
565  if(print){std::cout<<"even!=0"<<std::endl;}
566  if(x0 >= 0. && x1 + xEn <= a){xK = a - (x1 + xEn);}
567  if(x0 >= 0. && x1 + xEn > a){xK = x1 + xEn - a; n = 1. + n;}
568  if(x0 < 0. && x1 + xEn >= 0.){xK = x1 + xEn; n = -1. -n;}
569  if(x0 < 0. && x1 + xEn < 0.) {xK = - (x1 + xEn); n = -n;}
570  if(print){std::cout<<"xK = "<< xK<<", n = "<<n<<std::endl;}
571 
572  }
573 
574  *NN = n;
575  return xK;
576 }
Double_t x0
Definition: checkhelixhit.C:70
__m128 m
Definition: P4_F32vec4.h:28
int n
Int_t a
Definition: anaLmdDigi.C:126
Double_t
void PndDrc::FinishPrimary ( )
virtual

Definition at line 497 of file PndDrc.cxx.

497 {}
void PndDrc::FinishRun ( )

Definition at line 584 of file PndDrc.cxx.

584  {
585  // hSpec->Draw();
586 }
TClonesArray * PndDrc::GetCollection ( Int_t  iColl) const
virtual

Accessor to the hit collection

Definition at line 596 of file PndDrc.cxx.

References fDrcBarCollection, fDrcEVCollection, and fDrcPDCollection.

596  {
597  if (iColl == 0) return fDrcPDCollection;
598  if (iColl == 1) return fDrcEVCollection;
599  if (iColl == 2) return fDrcBarCollection;
600 
601  return NULL;
602 }
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
void PndDrc::Initialize ( )
virtual

Definition at line 218 of file PndDrc.cxx.

References PndGeoDrc::barBoxZDown(), PndGeoDrc::barBoxZUp(), PndGeoDrc::barHalfThick(), PndGeoDrc::barNum(), PndGeoDrc::BarWidth(), PndGeoDrc::BBoxGap(), PndGeoDrc::BBoxNum(), PndGeoHandling::CreateUniqueSensorId(), Double_t, fbarnum, fbarwidth, fbbGap, fbbnum, fCollectionEff, fDetEff, fDetEffAtProduction, fdphi, fEfficiencyR, fGeo, fGeoH, fhthick, fListOfSensitives, fphi0, fpi, fpipehAngle, fradius, fRunCherenkov, fzdown, fzup, gGeoManager, i, Initialize(), lambda(), Pi, PndGeoDrc::PipehAngle(), PndGeoHandling::PrintSensorNames(), and PndGeoDrc::radius().

218  {
219  cout << " -I- PndDrc: Intialization started... " << endl;
221  //FairRun *sim = FairRun::Instance();
222  //FairRuntimeDb *rtdb = sim->GetRuntimeDb();
223  //PndGeoDrcPar *par = (PndGeoDrcPar*)(rtdb->getContainer("PndGeoDrcPar"));
224 
225  if (0==gGeoManager)
226  cout << "We do not have gGeoManager" << endl;
227  else
228  cout << "there is gGeoManager" << endl;
229 
230 
231  cout << "list of sensitives has " << fListOfSensitives.size() << " entries" << endl;
233  if(fVerboseLevel>0) fGeoH->PrintSensorNames();
234 
235  if (fRunCherenkov==kFALSE) cout << " -I- PndDrc: Switching OFF Cherenkov Propagation" << endl;
236 
237  // basic DIRC parameters:
238  fpi = TMath::Pi();
239  fzup = fGeo->barBoxZUp();
240  fzdown = fGeo->barBoxZDown();
241  fradius = fGeo->radius(); //radius in the middle of the bar = 50.cm
242  fhthick = fGeo->barHalfThick(); //half thickness of the bars=1.7/2 cm
244  fbbGap = fGeo->BBoxGap();
245  fbbnum = fGeo->BBoxNum();
246  fbarnum = fGeo->barNum();
247  fphi0 = (180.-2.*fpipehAngle)/fbbnum + fpipehAngle;
248  fdphi = (180.-2.*fpipehAngle)/fbbnum*2.;
249  fbarwidth = fGeo->BarWidth();
250 
251  // create a detector efficiency function:
252  if(fDetEffAtProduction == kTRUE){
253  fCollectionEff=0.65;//Collection Efficiency
254 
255  // quantum efficiency data from Alex Britting, Jan 25, 2011
256  // unit is percent
257  // first value is at 200 nm, last at 700 nm
258  // credible range start around 250nm, >= 280nm to be safe
259 
260  Int_t credibleLimit=280;
261  Double_t efficiency[501] = {231.84,615.36,657.4,258.78,9839.92,44.67,67.87,51.01,41.49,5.36,49.4,2.13,35.49,8.66,5.03,7.51,13.27,18.71,3.92,3.66,8.2,0.56,7.68,2.87,10.06,3.47,3.39,6.99,6.01,4.92,6.25,5.97,6.92,8.29,10.45,8.68,8.6,9.79,11.76,9.53,10.98,9.9,10.97,11.31,10.88,10.78,12.16,12.38,12.37,13.04,12.36,13.18,13.7,13.85,13.66,13.98,14.55,14.93,14.82,14.97,14.98,15.14,15.35,15.37,15.43,15.49,15.59,15.84,15.84,15.92,16.01,16.22,16.41,16.42,16.52,16.86,17.1,17.17,17.22,17.46,17.79,17.99,18.13,18.33,18.34,18.53,18.72,18.95,19.02,19.15,19.28,19.45,19.66,19.69,19.77,19.73,19.95,19.98,20.17,20.29,20.33,20.37,20.47,20.48,20.57,20.75,20.8,20.84,20.86,20.88,21.0,21.06,21.0,21.06,21.06,21.04,21.1,21.14,21.08,21.17,21.3,21.38,21.49,21.58,21.69,21.77,21.87,22.02,22.13,22.29,22.35,22.45,22.53,22.55,22.64,22.67,22.73,22.74,22.71,22.79,22.76,22.77,22.76,22.75,22.78,22.7,22.68,22.72,22.66,22.64,22.7,22.67,22.71,22.67,22.75,22.77,22.83,22.84,22.93,22.97,23.0,23.08,23.16,23.27,23.25,23.37,23.44,23.49,23.55,23.52,23.58,23.64,23.63,23.58,23.64,23.63,23.62,23.64,23.63,23.66,23.59,23.59,23.56,23.58,23.63,23.57,23.66,23.62,23.67,23.64,23.54,23.57,23.51,23.53,23.45,23.3,23.41,23.25,23.21,23.08,23.01,22.92,22.9,22.76,22.76,22.61,22.53,22.48,22.39,22.29,22.24,22.2,22.12,22.07,21.96,21.89,21.87,21.76,21.74,21.58,21.49,21.48,21.37,21.29,21.2,21.17,21.03,20.98,20.92,20.85,20.76,20.69,20.58,20.56,20.47,20.37,20.32,20.24,20.13,20.08,19.9,19.84,19.77,19.69,19.63,19.51,19.41,19.27,19.06,19.01,18.87,18.7,18.49,18.41,18.17,17.98,17.84,17.69,17.5,17.25,17.15,16.98,16.79,16.66,16.48,16.32,16.19,16.02,15.88,15.77,15.67,15.5,15.39,15.23,15.09,15.04,14.92,14.75,14.7,14.5,14.45,14.34,14.25,14.16,14.13,14.0,13.92,13.84,13.76,13.73,13.61,13.54,13.52,13.45,13.41,13.39,13.31,13.22,13.17,13.13,13.06,13.2,13.09,12.97,12.92,12.73,12.65,12.4,12.22,12.02,11.79,11.59,11.33,11.03,10.68,10.46,10.14,9.88,9.62,9.36,9.14,8.87,8.63,8.51,8.24,8.07,7.88,7.77,7.65,7.52,7.35,7.27,7.21,7.1,6.92,6.89,6.79,6.74,6.56,6.54,6.5,6.39,6.33,6.25,6.27,6.14,6.06,6.04,6.01,5.91,5.89,5.79,5.75,5.75,5.67,5.61,5.51,5.52,5.43,5.43,5.34,5.31,5.35,5.23,5.2,5.14,5.11,5.11,5.01,4.98,4.93,4.99,4.89,4.82,4.87,4.8,4.7,4.65,4.65,4.61,4.49,4.56,4.44,4.42,4.44,4.35,4.35,4.27,4.29,4.19,4.13,4.08,4.02,4.07,3.92,3.95,3.88,3.82,3.86,3.74,3.71,3.66,3.72,3.62,3.55,3.56,3.57,3.45,3.38,3.36,3.36,3.28,3.25,3.19,3.26,3.13,3.17,3.15,3.04,2.98,2.93,2.98,2.9,2.89,2.9,2.81,2.74,2.81,2.68,2.73,2.7,2.57,2.58,2.55,2.55,2.37,2.39,2.39,2.44,2.37,2.26,2.27,2.27,2.23,2.26,2.14,2.08,2.15,2.06,2.09,2.04,2.0,1.95,2.02,1.87,1.9,1.8,1.87,1.85,1.87,1.81,1.86,1.74,1.74,1.63,1.59,1.5,1.5,1.44,1.47,1.32,1.24,1.28,1.19,1.21,1.21,1.1,1.1,1.05,1.06,0.94,0.92,0.87,0.92,0.81,0.86,0.78,0.77,0.8,0.67,0.7,0.81,0.61,0.64,0.71,0.66,0.67,0.68,0.69,0.68,0.73};
262 
263  Double_t lambda[1000];
264  for(Int_t i=0; i<1000; i++) lambda[i] = i;
265 
266  // still need to convert from percent and cut values below credible limit
267  for (Int_t iBin=0;iBin<1000;iBin++){
268  if (iBin<credibleLimit || iBin > 700){
269  fEfficiencyR[iBin]=0.;
270  }else{
271  // total detector efficiency
272  fEfficiencyR[iBin]=efficiency[iBin-200]/100.*fCollectionEff;
273  }
274  }
275 
276  fDetEff = new TGraph(1000, lambda,fEfficiencyR);
277  }
278 
279  cout << " -I- PndDrc: Intialization successfull" << endl;
280 }
Double_t fpipehAngle
Definition: PndDrc.h:234
Double_t fEfficiencyR[1000]
Definition: PndDrc.h:265
Double_t fzdown
Definition: PndDrc.h:231
Double_t fbarwidth
Definition: PndDrc.h:241
Double_t fzup
Definition: PndDrc.h:230
Double_t BBoxNum()
Definition: PndGeoDrc.h:136
Int_t i
Definition: run_full.C:25
Double_t lambda(Double_t x, Double_t y, Double_t z)
Definition: drawdal.C:48
Double_t fbbGap
Definition: PndDrc.h:235
Double_t BarWidth()
Definition: PndGeoDrc.h:100
void CreateUniqueSensorId(TString startName, std::vector< std::string > listOfSensitives)
Has to be called during simulation to create unique sensor id.
Double_t BBoxGap()
Definition: PndGeoDrc.h:130
TGeoManager * gGeoManager
Double_t barBoxZDown()
Definition: PndGeoDrc.h:104
Double_t fCollectionEff
Definition: PndDrc.h:272
Double_t PipehAngle()
Definition: PndGeoDrc.h:139
Bool_t fRunCherenkov
///< converter for detector names
Definition: PndDrc.h:245
Double_t barBoxZUp()
Definition: PndGeoDrc.h:108
void PrintSensorNames()
Double_t fphi0
Definition: PndDrc.h:239
TGraph * fDetEff
Definition: PndDrc.h:268
Double_t
Double_t fdphi
Definition: PndDrc.h:240
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
PndGeoDrc * fGeo
Definition: PndDrc.h:282
Double_t barHalfThick()
Definition: PndGeoDrc.h:96
Double_t fbarnum
Definition: PndDrc.h:238
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
std::vector< std::string > fListOfSensitives
Definition: PndDrc.h:179
Double_t fpi
Definition: PndDrc.h:229
Double_t fhthick
Definition: PndDrc.h:233
Double_t Pi
Mvd Initialize()
Double_t barNum()
Definition: PndGeoDrc.h:124
Double_t fradius
Definition: PndDrc.h:232
Double_t fbbnum
Definition: PndDrc.h:237
Double_t radius()
Definition: PndGeoDrc.h:92
void PndDrc::NumberOfBounces ( TVector3  start,
TVector3  dir,
Int_t  barId,
Int_t *  n1,
Int_t *  n2,
Double_t alpha1,
Double_t alpha2 
)

Definition at line 500 of file PndDrc.cxx.

References cos(), Double_t, fabs(), fbarwidth, fGeoH, fhthick, FindOutPoint(), fpi, fzdown, fzup, PndGeoHandling::MasterToLocalShortId(), and sin().

Referenced by ProcessHits().

500  {
501  // start - photon production point in global coord system
502  // dir - photon direction in bar coord system
503 
504  // calculates the number of bounces in x and y direction and reflection angles in these directions.
505 
506  // Find coordinates of X0, Y0:
507  Double_t Z0, X0, Y0;
508  if(dir.Theta() < 3.1415/2.){
509  Z0 = -(fabs(fzup) + 2.*fzdown - start.Z());
510  }
511  if(dir.Theta() >= 3.1415/2.){
512  Z0 = -(start.Z() - fzup);
513  }
514  X0 = Z0*tan(dir.Theta())*cos(dir.Phi());
515  Y0 = Z0*tan(dir.Theta())*sin(dir.Phi());
516  //cout<<"-I- NumberOfBounces: X0 = "<<X0<<", Y0 = "<<Y0<<endl;
517 
518  // Find the start position of the photon with respect to the middle of the bar:
519  TVector3 startLocal = fGeoH->MasterToLocalShortId(start, barId); // point
520 
521  // Find the number of bounces in each direction
522  Double_t N1, N2;
523  FindOutPoint(X0, startLocal.X() + fbarwidth/2., fbarwidth, &N1, 0);
524  FindOutPoint(Y0, startLocal.Y() + fhthick, 2.*fhthick, &N2, 0);
525  //cout<<"-I- NumberOfBounces: N1 = "<<N1<<", N2 = "<<N2<<endl;
526 
527  *n1 = (Int_t)N1;
528  *n2 = (Int_t)N2;
529 
530  // calculate the reflection angles in x and y directions:
531  TVector3 up_down;
532  up_down.SetXYZ(0.,1.,0.);
533  TVector3 left_right;
534  left_right.SetXYZ(1.,0.,0.);
535  Double_t angle1 = dir.Angle(left_right);
536  if(angle1 > fpi/2.){angle1 = fpi - dir.Angle(left_right);}
537  Double_t angle2 = dir.Angle(up_down);
538  if(angle2 > fpi/2.){angle2 = fpi - dir.Angle(up_down);}
539  *alpha1 = angle1;
540  *alpha2 = angle2;
541  //cout<<"-I- NumberOfBounces: angle1 = "<<angle1<<", angle2 = "<<angle2<<endl;
542 }
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
Double_t fzdown
Definition: PndDrc.h:231
Double_t fbarwidth
Definition: PndDrc.h:241
Double_t fzup
Definition: PndDrc.h:230
friend F32vec4 sin(const F32vec4 &a)
Definition: P4_F32vec4.h:111
Double_t
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
Double_t FindOutPoint(Double_t, Double_t, Double_t, Double_t *, Bool_t)
Definition: PndDrc.cxx:545
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
Double_t fpi
Definition: PndDrc.h:229
Double_t fhthick
Definition: PndDrc.h:233
void PndDrc::Print ( ) const
virtual

Virtual method Print

Screen output of hit collection.

Definition at line 605 of file PndDrc.cxx.

References fDrcBarCollection, fDrcEVCollection, fDrcPDCollection, and i.

Referenced by EndOfEvent().

605  {
606  Int_t nPDHits = fDrcPDCollection->GetEntriesFast();
607  Int_t nBarHits = fDrcBarCollection->GetEntriesFast();
608  Int_t nEVHits = fDrcEVCollection->GetEntriesFast();
609 
610  cout << "-I- PndDrc: " << nPDHits << " points registered in the photodetector for this event." << endl;
611  cout << "-I- PndDrc: " << nEVHits << " points registered in the expansion volume for this event." << endl;
612  cout << "-I- PndDrc: " << nBarHits << " points registered in the bar for this event." << endl;
613 
614  if (fVerboseLevel>1){
615  for (Int_t i=0; i<nPDHits; i++) (*fDrcPDCollection)[i]->Print();
616  for (Int_t i=0; i<nEVHits; i++) (*fDrcEVCollection)[i]->Print();
617  for (Int_t i=0; i<nBarHits; i++) (*fDrcBarCollection)[i]->Print();
618  }
619 }
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
Int_t i
Definition: run_full.C:25
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
Bool_t PndDrc::ProcessHits ( FairVolume *  vol = 0)
virtual

Virtual method ProcessHits

Defines the action to be taken when a step is inside the active volume. Creates PndDrcPoints and PndDrcMirrorPoints and adds them to the collections.

Parameters
volPointer to the active volume

Definition at line 291 of file PndDrc.cxx.

References acos(), AddBarHit(), AddEVHit(), AddHit(), PndStack::AddPoint(), b, cos(), Double_t, fabs(), fDetEff, fDetEffAtProduction, fEventID, fGeo, fGeoH, fLength, fLengthEV, fMass, fMom, fMomAtEV, fNBar, fOptionForLUT, fPdgCode, fPhoMaxTime, fpi, fPos, fRand, fRunCherenkov, fStopChargedTrackAfterDIRC, fStopSecondaries, fStopTime, fThetaC, fTime, fTimeAtEV, fTimeAtEVEntrance, fTimeStart, fTrackID, fTransportEffAtProduction, fVeloPhoton, PndGeoHandling::GetShortID(), gGeoManager, kDRC, lambda(), PndGeoHandling::MasterToLocalShortId(), nam, PndGeoDrc::nQuartz(), num, NumberOfBounces(), ResetParameters(), PndGeoDrc::Roughness(), s, sqrt(), CAMath::Sqrt(), and TString.

291  {
292  TString nam =vol->GetName();
293  Int_t num = vol->getMCid();
294 
295  fEventID = gMC->CurrentEvent();
296  fPdgCode = gMC->TrackPid();
297 
298  fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
299  fTime = gMC->TrackTime() * 1.0e09;
300  fLength = gMC->TrackLength();
301  gMC->TrackPosition(fPos);
302  gMC->TrackMomentum(fMom);
303 
304  // if(nam.BeginsWith("DrcBar") && gMC->IsTrackEntering() && fPdgCode == 50000050){
305  // hSpec->Fill(fMom.Vect().Mag()*1e9);
306  // gMC->StopTrack();
307  // }
308 
309 
310  // // print out info about the charged particle:
311  // if(gMC->GetStack()->GetCurrentParentTrackNumber()==0 && fPdgCode == 11){
312  // Int_t nproc = gMC->StepProcesses(fProc);
313  // cout<<"-I- PndDrc:"<<endl;
314  // for(Int_t ii=0; ii<nproc; ii++){
315  // cout<<"track "<<fPdgCode<<" number "<<gMC->GetStack()->GetCurrentTrackNumber()<<" mother id = "<<gMC->GetStack()->GetCurrentParentTrackNumber()<<": Z pos "<<fPos.Z()<<", R = "<<sqrt(pow(fPos.X(),2) + pow(fPos.Y(),2))<<", "<<ii<<" - "<<fProc[ii]<<", "<<TMCProcessName[fProc[ii]]<<endl;
316  // }
317  // }
318 
319  //stop secondaries so that they do not produce Cherenkov photons
320  if(fStopSecondaries){
321  if(fPdgCode != 50000050){
322  if(gMC->GetStack()->GetCurrentParentTrackNumber() != -1 ){
323  if(gMC->IsNewTrack()) gMC->StopTrack();
324  }
325  }
326  }
327 
328  // stop the track after the DIRC:
330  if(fPdgCode != 50000050 && gMC->IsTrackExiting() && num == gMC->VolId("DrcBarSensor")){
331  cout<<"track is stopped after the Barrel DIRC"<<endl;
332  gMC->StopTrack();
333  }
334  if(nam.BeginsWith("DrcEVSensor") && gMC->IsTrackExiting() && fMom.Z() > 0.) gMC->StopTrack();
335  }
336 
337  if (fPdgCode == 50000050){
338  if (fRunCherenkov==kFALSE ) { //|| fabs(fMom.Vect().Mag()*1.0E9-3.18)>0.2
339  if (fVerboseLevel >0) cout<< "Photon killed" << endl;
340  gMC->StopTrack();
341  }
342 
343  // apply detector efficiency at the production stage:
344  if(fDetEffAtProduction && gMC->IsNewTrack()){
345  Double_t lambda = 197.0*2.0*fpi/(fMom.Vect().Mag()*1.0E9);
346  Double_t ra = fRand.Uniform(0., 1.);
347  if(ra > fDetEff->Eval(lambda)) gMC->StopTrack();
348  //if(ra > fEfficiencyR[(int)lambda]) gMC->StopTrack();
349  }
350 
351  //if the photon goes backward through the lens, stop it
352  if(gMC->IsTrackExiting() && nam.Contains("LENS")){
353  if(fMom.Z() > 0.) gMC->StopTrack();
354  }
355 
356  if(fOptionForLUT && fMom.Z() > 0.) gMC->StopTrack();
357 
358  // apply transport efficiency at production stage (Maria Patsyuk 20.04.2012):
359  if(fTransportEffAtProduction && gMC->IsNewTrack()){
360  Double_t lam_tr = (197.0*2.0*fpi/(fMom.Vect().Mag()*1.0E9)) / 1000.;
361 
362  // current volume (should be the radiator bar)
363  Int_t barId = fGeoH->GetShortID(gMC->CurrentVolPath());
364  //calculate the number of bounces:
365  Int_t NbouncesX, NbouncesY;
366  Double_t angleX, angleY;
367  // photon initial direction
368  TVector3 PphoInitBar = fGeoH->MasterToLocalShortId(fMom.Vect(), barId)- fGeoH->MasterToLocalShortId(TVector3(0.,0.,0.), barId); // vector
369  NumberOfBounces(fPos.Vect(), PphoInitBar, barId, &NbouncesX, &NbouncesY, &angleX, &angleY);
370  // calculate the bounce probability
371  Double_t n_quartz = sqrt(1. + (0.696*lam_tr*lam_tr/(lam_tr*lam_tr-pow(0.068,2))) + (0.407*lam_tr*lam_tr/(lam_tr*lam_tr-pow(0.116,2))) + 0.897*lam_tr*lam_tr/(lam_tr*lam_tr-pow(9.896,2)));
372  Double_t bounce_probX = 1. - pow(4.*fpi*cos(angleX)*fGeo->Roughness()*n_quartz/lam_tr,2);
373  Double_t bounce_probY = 1. - pow(4.*fpi*cos(angleY)*fGeo->Roughness()*n_quartz/lam_tr,2);
374 
375  Double_t TotalTrProb = pow(bounce_probX, (Int_t)NbouncesX)*pow(bounce_probY, (Int_t)NbouncesY);
376  Double_t ra_tr = fRand.Uniform(0., 1.);
377  if(ra_tr > TotalTrProb) gMC->StopTrack();
378  }
379 
380  // kill photons older than fPhoMaxTime:
381  if (fStopTime == kTRUE && gMC->TrackTime()*1.0e09 > fPhoMaxTime){
382  gMC->StopTrack();
383  }
384 
385  if(gMC->IsTrackEntering() && num == gMC->VolId("DrcEVSensor")){
386  gMC->TrackMomentum(fMomAtEV);
387  }
388 
389  if(gMC->IsTrackEntering()){
390  if(gMC->IsNewTrack()) fTimeStart = fTime; // charged particle time at entrance of radiator bar
391 
392  // if(nam.BeginsWith("DrcLENS1Sensor")){ //DrcEntranceBox
393  // // save the direction of the photon when it enters EntranceBox (for LUT generation)
394  // Double_t nx,ny,nz;
395  // bool bres = gMC->CurrentBoundaryNormal(nx,ny,nz);
396  // AddEVHit(fTrackID, 9375, fPos.Vect(), fMom.Vect().Unit(),
397  // fTime, fLength, fPdgCode,
398  // fEventID, fTimeStart, fTimeAtEVEntrance, fVeloPhoton, TVector3(nx,ny,nz));
399  // }
400 
401  if(nam.BeginsWith("DrcEVSensor")){
402  if(fTimeAtEVEntrance ==0.){
403  fTimeAtEVEntrance= gMC->TrackTime()*1.0e09;
405  }
407 
408  Double_t nmast[3];
409  //bool bres = gMC->CurrentBoundaryNormal(nmast[0],nmast[1],nmast[2]); //[R.K. 01/2017] unused variable?
410  //TVector3 lnorm = fGeoH->MasterToLocalShortId(TVector3(nx,ny,nz), fGeoH->GetShortID(gMC->CurrentVolPath()));
411 
412  Double_t result[3];
413  gGeoManager->MasterToLocalVect(nmast, result);
414  TVector3 lnorm = TVector3(result[0],result[1],result[2]);
415 
416  //if(bres)
417  AddEVHit(fTrackID, 0, fPos.Vect(), fMom.Vect(),
420 
421  fTimeAtEVEntrance = 0.0;
422  }
423  }
424 
425  // if a photon is exiting the readout bar end
426  if (gMC->IsTrackExiting() && num == gMC->VolId("DrcBarSensor") && fPos.Z()<-118.99){
427  fTimeAtEV = gMC->TrackTime()*1.0e09;
428  //cout<<"time at EV = "<<fTimeAtEV<<endl;
429  }
430 
431  if (gMC->IsTrackEntering()){
432  if (nam.BeginsWith("DrcCathodeSensor")){
433  if(0==fGeoH) {
434  std::cout<<" -E- No PndGeoHandling loaded."<<std::endl;
435  abort();
436  }
437  Int_t sensorId = fGeoH->GetShortID(gMC->CurrentVolPath());
438  Int_t mcpId, prismId;
439  sscanf(gMC->CurrentVolPath(), "/cave_1/BarrelDIRC_0/DrcPDbase_%d/DrcMCP_%d", &prismId, &mcpId);
440  if(fTrackID>-2){
441  AddHit(fTrackID, sensorId, mcpId,
442  fPos.Vect(),fMom.Vect(),fMomAtEV.Vect(), fTimeAtEV,
444  }
445 
446  gMC->StopTrack();
447  }
448  PndStack* stack = (PndStack*) gMC->GetStack();
449  stack->AddPoint(kDRC);
450  }
451  }
452 
453 
454  if(gMC->TrackCharge()!=0 || fOptionForLUT){
455  if(nam.BeginsWith("DrcBar") && gMC->IsTrackEntering()){
456 
457  bool bpass = true;
458  // if(fDrcBarCollection->GetEntriesFast()>0){
459  // PndDrcBarPoint *tBarPoint = (PndDrcBarPoint*) fDrcBarCollection->At(fDrcBarCollection->GetEntriesFast()-1);
460  // if(tBarPoint->GetTrackID()==fTrackID && fLength - tBarPoint->GetLength()<0.1) bpass = false;
461  // }
462 
463  if(bpass && nam.BeginsWith("DrcBarSensor") ){
464  Int_t s=0, b=0; //side and bar
465  fNBar=0;
466  TString path = gMC->CurrentVolPath();
467  if (fVerboseLevel >1) cout<< "Volume: " << nam << endl;
468  sscanf(path, "/cave_1/BarrelDIRC_0/DrcBarBox_%d/DrcBarBoxCover_0/DrcBarBoxAir_0/DrcBarSensor_%d", &s, &b);
469 
470  if(s < 17) fNBar = s*10 + b;
471  else std::cout<<"Error: Wrong BarBox Id "<< s <<std::endl;
472 
473  TVector3 barMom = fMom.Vect();
474  Double_t fP = barMom.Mag();
475  fMass = gMC->TrackMass();
476  Double_t fEnergy = TMath::Sqrt(fP*fP + fMass*fMass);
477 
478  if ( fP == 0. || fabs(1./(fGeo->nQuartz()*(fP/fEnergy)))>1){
479  fThetaC = -1;
480  }else{
481  fThetaC = acos(1/(fGeo->nQuartz()*(fP/fEnergy)));
482  }
483 
484  AddBarHit(fTrackID, fGeoH->GetShortID(path), fPos.Vect(), barMom,
486 
487  PndStack* stack = (PndStack*) gMC->GetStack();
488  stack->AddPoint(kDRC);
489  }
490  }
491  }
492 
493  ResetParameters();
494  return kTRUE;
495 }
friend F32vec4 acos(const F32vec4 &a)
Definition: P4_F32vec4.h:113
friend F32vec4 cos(const F32vec4 &a)
Definition: P4_F32vec4.h:112
int num[96]
Definition: ranlxd.cxx:381
TTree * b
Bool_t fStopTime
Definition: PndDrc.h:274
Double_t lambda(Double_t x, Double_t y, Double_t z)
Definition: drawdal.C:48
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
Double_t fPhoMaxTime
Definition: PndDrc.h:275
Bool_t fTransportEffAtProduction
Definition: PndDrc.h:270
static T Sqrt(const T &x)
Definition: PndCAMath.h:37
TLorentzVector fMom
position
Definition: PndDrc.h:249
TLorentzVector s
Definition: Pnd2DStar.C:50
void NumberOfBounces(TVector3, TVector3, Int_t, Int_t *, Int_t *, Double_t *, Double_t *)
Definition: PndDrc.cxx:500
Double32_t fTime
momentum
Definition: PndDrc.h:250
Int_t fTrackID
Switch ON/OFF Cherenkov propagation.
Definition: PndDrc.h:246
PndDrcPDPoint * AddHit(Int_t trackID, Int_t copyNo, Int_t mcpId, TVector3 pos, TVector3 mom, TVector3 momAtEV, Double_t timeAtEV, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID)
Definition: PndDrc.cxx:853
TGeoManager * gGeoManager
TRandom3 fRand
Definition: PndDrc.h:271
Double_t fMass
MC volume ID of drc.
Definition: PndDrc.h:257
void AddPoint(DetectorId iDet)
Definition: PndStack.cxx:408
Double32_t fLength
time
Definition: PndDrc.h:251
TLorentzVector fPos
Definition: PndDrc.h:248
Bool_t fOptionForLUT
Definition: PndDrc.h:280
Bool_t fRunCherenkov
///< converter for detector names
Definition: PndDrc.h:245
TGraph * fDetEff
Definition: PndDrc.h:268
Double_t
Double32_t fLengthEV
length
Definition: PndDrc.h:252
PndDrcEVPoint * AddEVHit(Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Int_t eventID, Double_t timestart, Double_t timestartEV, Double_t VeloPhoton, TVector3 normal)
Definition: PndDrc.cxx:875
Int_t fEventID
Hit collection in the bar.
Definition: PndDrc.h:291
Double_t nQuartz()
Definition: PndGeoDrc.h:70
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
Int_t fPdgCode
Pointer to basic DRC geometry data.
Definition: PndDrc.h:284
Double_t fTimeAtEVEntrance
Definition: PndDrc.h:260
Int_t GetShortID(TString path)
for a given path the (unique) position of the sensor path in the fSensorNamePar-List is given...
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TVector3 MasterToLocalShortId(const TVector3 &master, const Int_t &shortId)
PndGeoDrc * fGeo
Definition: PndDrc.h:282
PndDrcBarPoint * AddBarHit(Int_t trackID, Int_t copyNo, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Int_t pdgCode, Double_t thetaC, Int_t nBar, Int_t eventID, Double_t mass)
Definition: PndDrc.cxx:896
Bool_t fStopSecondaries
Definition: PndDrc.h:277
TLorentzVector fMomAtEV
Definition: PndDrc.h:258
Double_t fThetaC
Definition: PndDrc.h:285
PndGeoHandling * fGeoH
Definition: PndDrc.h:243
Double_t fpi
Definition: PndDrc.h:229
Bool_t fStopChargedTrackAfterDIRC
Definition: PndDrc.h:278
Int_t fNBar
Definition: PndDrc.h:254
void ResetParameters()
Definition: PndDrc.h:301
Double_t fTimeAtEV
Definition: PndDrc.h:259
Double_t fVeloPhoton
Definition: PndDrc.h:262
TString nam
Definition: sim_hypGe.C:48
Double_t fTimeStart
Definition: PndDrc.h:261
Double_t Roughness()
Definition: PndGeoDrc.h:80
void PndDrc::Register ( )
virtual

Virtual method Register

Registers the hit collection in the ROOT manager.

Definition at line 589 of file PndDrc.cxx.

References fDrcBarCollection, fDrcEVCollection, fDrcPDCollection, and fPersistency.

589  {
590  FairRootManager::Instance()->Register("DrcBarPoint","Drc", fDrcBarCollection, fPersistency);
591  FairRootManager::Instance()->Register("DrcEVPoint","Drc", fDrcEVCollection, fPersistency);
592  FairRootManager::Instance()->Register("DrcPDPoint","Drc", fDrcPDCollection, fPersistency);
593 }
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
Bool_t fPersistency
Definition: PndDrc.h:222
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
void PndDrc::Reset ( )
virtual

Virtual method Reset

Clears the hit collection

Definition at line 622 of file PndDrc.cxx.

References fDrcBarCollection, fDrcEVCollection, fDrcPDCollection, and fPosIndex.

Referenced by EndOfEvent().

622  {
623  fDrcPDCollection->Delete();
624  fDrcEVCollection->Delete();
625  fDrcBarCollection->Delete();
626  fPosIndex = 0;
627 }
TClonesArray * fDrcPDCollection
Definition: PndDrc.h:287
TClonesArray * fDrcBarCollection
Hit collection.
Definition: PndDrc.h:289
TClonesArray * fDrcEVCollection
Hit collection.
Definition: PndDrc.h:288
Int_t fPosIndex
Definition: PndDrc.h:255
void PndDrc::ResetParameters ( )
inlineprivate

Definition at line 301 of file PndDrc.h.

References fAngIn, fLength, fMass, fMom, fNBar, fPdgCode, fPos, fThetaC, fTime, and fTrackID.

Referenced by ProcessHits().

301  {
302  fTrackID = -999;
303  fPos.SetXYZT(-999., -999., -999., -999.);
304  fMom.SetXYZT(-999., -999., -999., -999.) ;
305  fTime = -999;
306  fLength = -999;
307  fPdgCode = -999;
308  fAngIn = -999;
309  fThetaC = -999;
310  fNBar = -999;
311  //fEventID = -999;
312  fMass = -999;
313 }
TLorentzVector fMom
position
Definition: PndDrc.h:249
Double32_t fTime
momentum
Definition: PndDrc.h:250
Int_t fTrackID
Switch ON/OFF Cherenkov propagation.
Definition: PndDrc.h:246
Double_t fMass
MC volume ID of drc.
Definition: PndDrc.h:257
Double32_t fLength
time
Definition: PndDrc.h:251
TLorentzVector fPos
Definition: PndDrc.h:248
Int_t fPdgCode
Pointer to basic DRC geometry data.
Definition: PndDrc.h:284
Double_t fAngIn
Definition: PndDrc.h:253
Double_t fThetaC
Definition: PndDrc.h:285
Int_t fNBar
Definition: PndDrc.h:254
void PndDrc::SetBlackLensSides ( Bool_t  lesi = kFALSE)
inline

Definition at line 94 of file PndDrc.h.

References fSetBlackLens.

Referenced by QAmacro_drc_1(), sim(), and simLut().

94 {fSetBlackLens = lesi;}
Bool_t fSetBlackLens
Definition: PndDrc.h:279
void PndDrc::SetDetEffAtProduction ( Bool_t  dep = kFALSE)
inline

Kill photons at production point according to the detector efficiency distribution.

Parameters
dep

NOTE! Transport efficiency can not be used together with Detector efficiency: it can not be used like: SetDetEffAtProduction(kTRUE) SetTransportEffAtProduction(kTRUE)

at least one of them should be kFALSE

Definition at line 72 of file PndDrc.h.

References fDetEffAtProduction.

Referenced by QAmacro_drc_1(), sim(), sim_dirc(), and simLut().

72 {fDetEffAtProduction = dep;}
Bool_t fDetEffAtProduction
Detector Efficiency as a function of photon wavelength.
Definition: PndDrc.h:269
void PndDrc::SetMirrorReal ( Bool_t  mir = kTRUE)
inline

Choose between ideal and real mirror:

Parameters
mirkFALSE - take ideal mirror, reflectivity = 1 for photons within energy range 1..10 eV kTRUE - take real mirror, reflectivity has realistic values for photons within energy range 1.907..6.199 eV

Definition at line 92 of file PndDrc.h.

References fTakeRealReflectivity.

Referenced by QAmacro_drc_1(), sim(), sim_dirc(), and simLut().

92 {fTakeRealReflectivity = mir;}
Bool_t fTakeRealReflectivity
Definition: PndDrc.h:276
void PndDrc::SetOptionForLUT ( Bool_t  oplu = kFALSE)
inline

Virtual method Initialize Initialises detector. Stores volume IDs for DIRC detector and mirror.

Definition at line 109 of file PndDrc.h.

References fOptionForLUT.

Referenced by QAmacro_drc_1(), sim(), and simLut().

109 {fOptionForLUT = oplu;}
Bool_t fOptionForLUT
Definition: PndDrc.h:280
void PndDrc::SetPersistency ( Bool_t  v = kTRUE)
inline

Definition at line 112 of file PndDrc.h.

References fPersistency, and v.

112 { fPersistency = v; }
Bool_t fPersistency
Definition: PndDrc.h:222
__m128 v
Definition: P4_F32vec4.h:4
void PndDrc::SetRunCherenkov ( Bool_t  ch)
inline
void PndDrc::SetStopTime ( Double_t  ti = -1.)
inline

Set time after which photons are killed.

Parameters
tiThe time (ns)

Definition at line 99 of file PndDrc.h.

References fPhoMaxTime, and fStopTime.

Referenced by QAmacro_drc_1(), sim(), sim_dirc(), and simLut().

100  { fPhoMaxTime = ti;
101  if(fPhoMaxTime > 0.){fStopTime = kTRUE;}
102  if(fPhoMaxTime <= 0.){fStopTime = kFALSE;}
103  }
Bool_t fStopTime
Definition: PndDrc.h:274
Double_t fPhoMaxTime
Definition: PndDrc.h:275
void PndDrc::SetTransportEffAtProduction ( Bool_t  tra = kFALSE)
inline

Kill photons at production point according to the transport efficiency distribution.

Parameters
traNOTE! Transport efficiency can not be used together with Detector efficiency: it can not be used like: SetDetEffAtProduction(kTRUE) SetTransportEffAtProduction(kTRUE)

at least one of them should be kFALSE

Definition at line 85 of file PndDrc.h.

References fTransportEffAtProduction.

Referenced by QAmacro_drc_1(), and sim().

Bool_t fTransportEffAtProduction
Definition: PndDrc.h:270
void PndDrc::StopChargedTrackAfterDIRC ( Bool_t  sctad = kTRUE)
inline

Kill charged track by exiting the DIRC to avoid it hitting the large EV.

Parameters
sctad

Definition at line 58 of file PndDrc.h.

References fStopChargedTrackAfterDIRC.

Referenced by sim().

Bool_t fStopChargedTrackAfterDIRC
Definition: PndDrc.h:278
void PndDrc::StopSecondaries ( Bool_t  ss = kFALSE)
inline

Kill secondaries at its production point.

Parameters
ss

Definition at line 53 of file PndDrc.h.

References fStopSecondaries.

Referenced by QAmacro_drc_1(), sim(), sim_dirc(), and simLut().

53 {fStopSecondaries = ss;}
Bool_t fStopSecondaries
Definition: PndDrc.h:277

Member Data Documentation

Double_t PndDrc::fAngIn
private

Definition at line 253 of file PndDrc.h.

Referenced by ResetParameters().

Int_t PndDrc::fBarId
private

track index

Definition at line 247 of file PndDrc.h.

Double_t PndDrc::fbarnum
private

Definition at line 238 of file PndDrc.h.

Referenced by Initialize().

Double_t PndDrc::fbarwidth
private

Definition at line 241 of file PndDrc.h.

Referenced by Initialize(), and NumberOfBounces().

Double_t PndDrc::fbbGap
private

Definition at line 235 of file PndDrc.h.

Referenced by Initialize().

Double_t PndDrc::fbbnum
private

Definition at line 237 of file PndDrc.h.

Referenced by Initialize().

Double_t PndDrc::fCollectionEff
private

Definition at line 272 of file PndDrc.h.

Referenced by Initialize().

TGraph* PndDrc::fDetEff
private

Definition at line 268 of file PndDrc.h.

Referenced by Initialize(), and ProcessHits().

Bool_t PndDrc::fDetEffAtProduction
private

Detector Efficiency as a function of photon wavelength.

Definition at line 269 of file PndDrc.h.

Referenced by Initialize(), ProcessHits(), and SetDetEffAtProduction().

Double_t PndDrc::fdphi
private

Definition at line 240 of file PndDrc.h.

Referenced by Initialize().

TClonesArray* PndDrc::fDrcBarCollection
private

Hit collection.

Definition at line 289 of file PndDrc.h.

Referenced by AddBarHit(), AddHit(), GetCollection(), Print(), Register(), Reset(), and ~PndDrc().

TClonesArray* PndDrc::fDrcEVCollection
private

Hit collection.

Definition at line 288 of file PndDrc.h.

Referenced by AddEVHit(), GetCollection(), Print(), Register(), Reset(), and ~PndDrc().

TClonesArray* PndDrc::fDrcPDCollection
private

Definition at line 287 of file PndDrc.h.

Referenced by AddHit(), GetCollection(), Print(), Register(), Reset(), and ~PndDrc().

Double_t PndDrc::fEfficiencyR[1000]
private

Definition at line 265 of file PndDrc.h.

Referenced by Initialize().

Int_t PndDrc::fEventID
private

Hit collection in the bar.

Definition at line 291 of file PndDrc.h.

Referenced by BeginEvent(), and ProcessHits().

Int_t PndDrc::fEVreflections
private

Definition at line 266 of file PndDrc.h.

PndGeoDrc* PndDrc::fGeo
private

Definition at line 282 of file PndDrc.h.

Referenced by Initialize(), ProcessHits(), and ~PndDrc().

PndGeoHandling* PndDrc::fGeoH
private

Definition at line 243 of file PndDrc.h.

Referenced by Initialize(), NumberOfBounces(), PndDrc(), and ProcessHits().

Double_t PndDrc::fhthick
private

Definition at line 233 of file PndDrc.h.

Referenced by Initialize(), and NumberOfBounces().

Double32_t PndDrc::fLength
private

time

Definition at line 251 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Double32_t PndDrc::fLengthEV
private

length

Definition at line 252 of file PndDrc.h.

Referenced by ProcessHits().

std::vector<std::string> PndDrc::fListOfSensitives

Definition at line 179 of file PndDrc.h.

Referenced by CheckIfSensitive(), Initialize(), and PndDrc().

Double_t PndDrc::fMass
private

MC volume ID of drc.

Definition at line 257 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndDrc::fMom
private

position

Definition at line 249 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndDrc::fMomAtEV
private

Definition at line 258 of file PndDrc.h.

Referenced by ProcessHits().

Int_t PndDrc::fNBar
private

Definition at line 254 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Bool_t PndDrc::fOptionForLUT
private

Definition at line 280 of file PndDrc.h.

Referenced by ProcessHits(), and SetOptionForLUT().

Int_t PndDrc::fPdgCode
private

Pointer to basic DRC geometry data.

Definition at line 284 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Bool_t PndDrc::fPersistency
private

Definition at line 222 of file PndDrc.h.

Referenced by Register(), and SetPersistency().

Double_t PndDrc::fphi0
private

Definition at line 239 of file PndDrc.h.

Referenced by Initialize().

Double_t PndDrc::fPhoMaxTime
private

Definition at line 275 of file PndDrc.h.

Referenced by ProcessHits(), and SetStopTime().

Double_t PndDrc::fpi
private

Definition at line 229 of file PndDrc.h.

Referenced by Initialize(), NumberOfBounces(), and ProcessHits().

Double_t PndDrc::fpipehAngle
private

Definition at line 234 of file PndDrc.h.

Referenced by Initialize().

TLorentzVector PndDrc::fPos
private

Definition at line 248 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndDrc::fPosIndex
private

Definition at line 255 of file PndDrc.h.

Referenced by CopyClones(), and Reset().

Double_t PndDrc::fradius
private

Definition at line 232 of file PndDrc.h.

Referenced by Initialize().

TRandom3 PndDrc::fRand
private

Definition at line 271 of file PndDrc.h.

Referenced by ProcessHits().

Bool_t PndDrc::fRunCherenkov
private

///< converter for detector names

Definition at line 245 of file PndDrc.h.

Referenced by Initialize(), ProcessHits(), and SetRunCherenkov().

Bool_t PndDrc::fSetBlackLens
private

Definition at line 279 of file PndDrc.h.

Referenced by ConstructOpGeometry(), and SetBlackLensSides().

Bool_t PndDrc::fStopChargedTrackAfterDIRC
private

Definition at line 278 of file PndDrc.h.

Referenced by ProcessHits(), and StopChargedTrackAfterDIRC().

Bool_t PndDrc::fStopSecondaries
private

Definition at line 277 of file PndDrc.h.

Referenced by ProcessHits(), and StopSecondaries().

Bool_t PndDrc::fStopTime
private

Definition at line 274 of file PndDrc.h.

Referenced by ProcessHits(), and SetStopTime().

Bool_t PndDrc::fTakeRealReflectivity
private

Definition at line 276 of file PndDrc.h.

Referenced by ConstructOpGeometry(), and SetMirrorReal().

Double_t PndDrc::fThetaC
private

Definition at line 285 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Double32_t PndDrc::fTime
private

momentum

Definition at line 250 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Double_t PndDrc::fTimeAtEV
private

Definition at line 259 of file PndDrc.h.

Referenced by ProcessHits().

Double_t PndDrc::fTimeAtEVEntrance
private

Definition at line 260 of file PndDrc.h.

Referenced by ProcessHits().

Double_t PndDrc::fTimeStart
private

Definition at line 261 of file PndDrc.h.

Referenced by ProcessHits().

Int_t PndDrc::fTrackID
private

Switch ON/OFF Cherenkov propagation.

Definition at line 246 of file PndDrc.h.

Referenced by ProcessHits(), and ResetParameters().

Bool_t PndDrc::fTransportEffAtProduction
private

Definition at line 270 of file PndDrc.h.

Referenced by ProcessHits(), and SetTransportEffAtProduction().

Double_t PndDrc::fVeloPhoton
private

Definition at line 262 of file PndDrc.h.

Referenced by ProcessHits().

Double_t PndDrc::fzdown
private

Definition at line 231 of file PndDrc.h.

Referenced by Initialize(), and NumberOfBounces().

Double_t PndDrc::fzup
private

Definition at line 230 of file PndDrc.h.

Referenced by Initialize(), and NumberOfBounces().

Int_t PndDrc::volDetector
private

Definition at line 256 of file PndDrc.h.


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