SND@LHC Software
Loading...
Searching...
No Matches
EmulsionDet Class Reference

#include <EmulsionDet.h>

Inheritance diagram for EmulsionDet:
Collaboration diagram for EmulsionDet:

Public Member Functions

 EmulsionDet (const char *name, Bool_t Active, const char *Title="EmulsionDet")
 
 EmulsionDet ()
 
virtual ~EmulsionDet ()
 
void ConstructGeometry ()
 
virtual void Initialize ()
 
virtual Bool_t ProcessHits (FairVolume *v=0)
 
virtual void Register ()
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 
virtual void Reset ()
 
EmulsionDetPointAddHit (Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
 
virtual void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
 
virtual void SetSpecialPhysicsCuts ()
 
virtual void EndOfEvent ()
 
virtual void FinishPrimary ()
 
virtual void FinishRun ()
 
virtual void BeginPrimary ()
 
virtual void PostTrack ()
 
virtual void PreTrack ()
 
virtual void BeginEvent ()
 
void DecodeBrickID (Int_t detID, Int_t &NWall, Int_t &NRow, Int_t &NColumn, Int_t &NPlate)
 
TString PathBrickID (Int_t detID)
 
void SetConfPar (TString name, Float_t value)
 
void SetConfPar (TString name, Int_t value)
 
void SetConfPar (TString name, TString value)
 
Float_t GetConfParF (TString name)
 
Int_t GetConfParI (TString name)
 
TString GetConfParS (TString name)
 
 EmulsionDet (const EmulsionDet &)
 
EmulsionDetoperator= (const EmulsionDet &)
 

Public Attributes

ClassDef(EmulsionDet, 5) private Int_t fVolumeID
 track index
 
TLorentzVector fPos
 volume id
 
TLorentzVector fMom
 position at entrance
 
Double32_t fTime
 momentum at entrance
 
Double32_t fLength
 time
 
Double32_t fELoss
 length
 
TClonesArray * fEmulsionDetPointCollection
 energy loss
 
std::map< TString, Float_t > conf_floats
 
std::map< TString, Int_t > conf_ints
 
std::map< TString, TString > conf_strings
 

Protected Member Functions

Int_t InitMedium (const char *name)
 

Protected Attributes

Double_t XDimension
 
Double_t YDimension
 
Double_t ZDimension
 
Int_t fNWall
 
Int_t fNRow
 
Int_t fNCol
 
Int_t fNTarget
 
Int_t number_of_plates
 
Double_t WallXDim
 
Double_t WallYDim
 
Double_t WallZDim
 
Double_t TotalWallZDim
 
Double_t WallZBorder_offset
 
Double_t EmulsionThickness
 
Double_t EmulsionX
 
Double_t EmulsionY
 
Double_t PlasticBaseThickness
 
Double_t PassiveThickness
 
Double_t EmPlateWidth
 
Double_t AllPlateWidth
 
Double_t BrickPackageX
 
Double_t BrickPackageY
 
Double_t BrickPackageZ
 
Double_t BrickZ
 
Double_t BrickY
 
Double_t BrickX
 
Int_t fPassiveOption
 
Double_t TTrackerZ
 
Double_t ShiftY
 
Double_t ShiftX
 

Detailed Description

Definition at line 23 of file EmulsionDet.h.

Constructor & Destructor Documentation

◆ EmulsionDet() [1/3]

EmulsionDet::EmulsionDet ( const char *  name,
Bool_t  Active,
const char *  Title = "EmulsionDet" 
)

Definition at line 74 of file EmulsionDet.cxx.

75: FairDetector(name, true, kEmulsionDet),
76fTrackID(-1),
77fVolumeID(-1),
78fPos(),
79fMom(),
80fTime(-1.),
81fLength(-1.),
82fELoss(-1),
83fEmulsionDetPointCollection(new TClonesArray("EmulsionDetPoint"))
84{
85}
@ kEmulsionDet
Double32_t fLength
time
Definition EmulsionDet.h:87
TClonesArray * fEmulsionDetPointCollection
energy loss
Definition EmulsionDet.h:91
ClassDef(EmulsionDet, 5) private Int_t fVolumeID
track index
Definition EmulsionDet.h:77
TLorentzVector fPos
volume id
Definition EmulsionDet.h:84
Double32_t fTime
momentum at entrance
Definition EmulsionDet.h:86
TLorentzVector fMom
position at entrance
Definition EmulsionDet.h:85
Double32_t fELoss
length
Definition EmulsionDet.h:88

◆ EmulsionDet() [2/3]

EmulsionDet::EmulsionDet ( )

Definition at line 61 of file EmulsionDet.cxx.

62: FairDetector("EmulsionDet", "",kTRUE),
63fTrackID(-1),
64fVolumeID(-1),
65fPos(),
66fMom(),
67fTime(-1.),
68fLength(-1.),
69fELoss(-1),
70fEmulsionDetPointCollection(new TClonesArray("EmulsionDetPoint"))
71{
72}

◆ ~EmulsionDet()

EmulsionDet::~EmulsionDet ( )
virtual

Definition at line 87 of file EmulsionDet.cxx.

◆ EmulsionDet() [3/3]

EmulsionDet::EmulsionDet ( const EmulsionDet )

Member Function Documentation

◆ AddHit()

EmulsionDetPoint * EmulsionDet::AddHit ( Int_t  trackID,
Int_t  detID,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Double_t  eLoss,
Int_t  pdgcode,
TVector3  Lpos,
TVector3  Lmom 
)

How to add your own point of type EmulsionDetPoint to the clones array

Definition at line 516 of file EmulsionDet.cxx.

520{
521 TClonesArray& clref = *fEmulsionDetPointCollection;
522 Int_t size = clref.GetEntriesFast();
523 return new(clref[size]) EmulsionDetPoint(trackID,detID, pos, mom,
524 time, length, eLoss, pdgCode,Lpos,Lmom);
525}

◆ BeginEvent()

virtual void EmulsionDet::BeginEvent ( )
inlinevirtual

Definition at line 61 of file EmulsionDet.h.

61{;}

◆ BeginPrimary()

virtual void EmulsionDet::BeginPrimary ( )
inlinevirtual

Definition at line 58 of file EmulsionDet.h.

58{;}

◆ ConstructGeometry()

void EmulsionDet::ConstructGeometry ( )

Create the detector geometry

Definition at line 162 of file EmulsionDet.cxx.

163{
164 // configuration parameters
165 XDimension = conf_floats["EmulsionDet/xdim"];
166 YDimension = conf_floats["EmulsionDet/ydim"];
167 ZDimension = conf_floats["EmulsionDet/zdim"];
168 fNCol = conf_ints["EmulsionDet/col"];
169 fNRow = conf_ints["EmulsionDet/row"];
170 fNWall = conf_ints["EmulsionDet/wall"];
171 fNTarget = conf_ints["EmulsionDet/target"];
172 WallXDim = conf_floats["EmulsionDet/WallXDim"];
173 WallYDim = conf_floats["EmulsionDet/WallYDim"];
174 WallZDim = conf_floats["EmulsionDet/WallZDim"];
175 TotalWallZDim = conf_floats["EmulsionDet/TotalWallZDim"];
176 WallZBorder_offset = conf_floats["EmulsionDet/WallZBorder_offset"];
177 EmulsionThickness = conf_floats["EmulsionDet/EmTh"];
178 EmulsionX = conf_floats["EmulsionDet/EmX"];
179 EmulsionY = conf_floats["EmulsionDet/EmY"];
180 PlasticBaseThickness = conf_floats["EmulsionDet/PBTh"];
181 EmPlateWidth = conf_floats["EmulsionDet/EPlW"];
182 PassiveThickness = conf_floats["EmulsionDet/PassiveTh"];
183 AllPlateWidth = conf_floats["EmulsionDet/AllPW"];
184 fPassiveOption = conf_ints["EmulsionDet/PassiveOption"];
185 BrickPackageX = conf_floats["EmulsionDet/BrPackX"];
186 BrickPackageY = conf_floats["EmulsionDet/BrPackY"];
187 BrickPackageZ = conf_floats["EmulsionDet/BrPackZ"];
188 BrickX = conf_floats["EmulsionDet/BrX"];
189 BrickY = conf_floats["EmulsionDet/BrY"];
190 BrickZ = conf_floats["EmulsionDet/BrZ"];
191 number_of_plates = conf_ints["EmulsionDet/n_plates"];
192 TTrackerZ = conf_floats["EmulsionDet/TTz"];
193 ShiftX = conf_floats["EmulsionDet/ShiftX"];
194 ShiftY = conf_floats["EmulsionDet/ShiftY"];
195
196 int NTungstenPlatesTB24 = conf_ints["EmulsionDet/n_tungsten_plates_tb24"];
197 bool testbeam_2024_setup = false;
198 if (NTungstenPlatesTB24 > 0) {
199 testbeam_2024_setup = true;
200 }
201
202 TGeoVolume *top=gGeoManager->FindVolumeFast("Detector");
203 if(!top) LOG(ERROR) << "no Detector volume found " ;
204 gGeoManager->SetVisLevel(10);
205
206 LOG(INFO) << " X: "<< XDimension<< " "<< YDimension<<" Z: "<<ZDimension;
207 LOG(INFO) <<" BrickX: "<< BrickX<<" Y: "<< BrickY<< " Z: "<< BrickZ;
208 //Materials
209 InitMedium("vacuum");
210 TGeoMedium *vacuum =gGeoManager->GetMedium("vacuum");
211
212 InitMedium("air");
213 TGeoMedium *air =gGeoManager->GetMedium("air");
214
215 InitMedium("Aluminum");
216 TGeoMedium *Al = gGeoManager->GetMedium("Aluminum");
217
218 InitMedium("PlasticBase");
219 TGeoMedium *PBase =gGeoManager->GetMedium("PlasticBase");
220
221 InitMedium("NuclearEmulsion");
222 TGeoMedium *NEmu =gGeoManager->GetMedium("NuclearEmulsion");
223
224 TGeoMaterial *NEmuMat = NEmu->GetMaterial(); //I need the materials to build the mixture
225 TGeoMaterial *PBaseMat = PBase->GetMaterial();
226
227 TGeoMixture * emufilmmixture = new TGeoMixture("EmulsionFilmMixture", 2.00); // two nuclear emulsions separated by the plastic base
228 Double_t frac_emu = NEmuMat->GetDensity() * 2 * EmulsionThickness /(NEmuMat->GetDensity() * 2 * EmulsionThickness + PBaseMat->GetDensity() * PlasticBaseThickness);
229
230 emufilmmixture->AddElement(NEmuMat,frac_emu);
231 emufilmmixture->AddElement(PBaseMat,1. - frac_emu);
232
233 TGeoMedium *Emufilm = new TGeoMedium("EmulsionFilm",100,emufilmmixture);
234
235 InitMedium("tungstensifon");
236 TGeoMedium *tungsten = gGeoManager->GetMedium("tungstensifon");
237
238
239 Int_t NPlates = number_of_plates; //Number of doublets emulsion + Pb
240
241
242 //TGeoVolume *top = gGeoManager->MakeBox("Top",vacuum,10.,10.,10.);
243 //gGeoManager->SetTopVolume(top);
244
245 //Definition of the target box containing emulsion bricks + target trackers (TT)
246 TGeoVolumeAssembly *volTarget = new TGeoVolumeAssembly("volTarget");
247
248 //
249 // //Volumes definition
250 // //
251
252 /*For testbeam 2024 there are plastic plates filling the upstream part of the target.
253 The last 28 layers have W+plastic plates.
254 The plastic layers in Wall1, Brick 1 are the same thickness as the plastic base in TI18 conf.
255 The plastic layers in Wall2, Brick 1 are 2 types of different thickness: 1 or 4/3 times the thickness of the TI18 plastic base.
256 These layers are alternating starting with the 4/3x-thick one, then 1x-thick one.
257 Whenever testbeam 2024 items are added in this function, there will be a note.
258 */
259
260 TGeoBBox *Walltot = new TGeoBBox("walltot",XDimension/2, YDimension/2, TotalWallZDim/2);
261 TGeoBBox *Wallint = new TGeoBBox("wallint",WallXDim/2, WallYDim/2, WallZDim/2);
262
263 TGeoTranslation * Wallborderpos = new TGeoTranslation("Walborderpos",0,0,WallZBorder_offset);
264 Wallborderpos->RegisterYourself();
265
266 TGeoCompositeShape *Wallborder = new TGeoCompositeShape("wallborder","walltot - (wallint:Walborderpos)");
267 TGeoVolume *volWallborder = new TGeoVolume("volWallborder", Wallborder, Al);
268 volWallborder->SetLineColor(kGray);
269
270 TGeoVolume *volWall = new TGeoVolume("Wall",Wallint,air);
271 TGeoVolume *volWall_2 = new TGeoVolume("Wall_2",Wallint,air);
272
273 //Rows
274 TGeoBBox *Row = new TGeoBBox("row",WallXDim/2, BrickY/2, BrickZ/2);
275 TGeoVolume *volRow = new TGeoVolume("Row",Row,air);
276 TGeoBBox *Row_W2 = new TGeoBBox("row_W2",WallXDim/2, BrickY/2, BrickZ/2);// testbeam 2024
277 TGeoVolume *volRow_W2 = new TGeoVolume("Row_W2",Row_W2,air);
278
279 //Bricks
280 TGeoBBox *Brick = new TGeoBBox("brick", BrickX/2, BrickY/2, BrickZ/2);
281 TGeoVolume *volBrick = new TGeoVolume("Brick",Brick,air);
282 volBrick->SetLineColor(kCyan);
283 volBrick->SetTransparency(1);
284
285 TGeoBBox *Brick_W2 = new TGeoBBox("brick_W2", BrickX/2, BrickY/2, BrickZ/2);// testbeam 2024
286 TGeoVolume *volBrick_W2 = new TGeoVolume("Brick_W2",Brick_W2,air);
287 volBrick_W2->SetLineColor(kOrange);
288 volBrick_W2->SetTransparency(1);
289
290 TGeoBBox *Passive = new TGeoBBox("Passive", EmulsionX/2, EmulsionY/2, PassiveThickness/2);
291 TGeoVolume *volPassive = new TGeoVolume("volPassive",Passive,tungsten);
292 volPassive->SetTransparency(1);
293 volPassive->SetLineColor(kGray);
294
295 // For the testbeam 2024, the upstream part of the brick is filled with plastic
296 float UpstreamPlasticThickness = (NPlates-NTungstenPlatesTB24)*AllPlateWidth;
297 // it is a little thinner for Wall2, where the pлastic plates have 2 thicknesses
298 float correction_W2 = NTungstenPlatesTB24/2*PlasticBaseThickness/3.;
299 float UpstreamPlasticThickness_W2 = UpstreamPlasticThickness - correction_W2;
300 TGeoBBox *Passive_plastic = new TGeoBBox("Passive_plastic", (EmulsionX-2.)/2, (EmulsionY-2.)/2, UpstreamPlasticThickness/2);
301 TGeoVolume *volPassive_plastic = new TGeoVolume("volPassive_plastic",Passive_plastic,PBase);
302 volPassive_plastic->SetLineColor(kMagenta);
303 volPassive_plastic->SetVisibility(kTRUE);
304
305 TGeoBBox *Passive_plastic_W2 = new TGeoBBox("Passive_plastic_W2", (EmulsionX-2.)/2, (EmulsionY-2.)/2, UpstreamPlasticThickness_W2/2);
306 TGeoVolume *volPassive_plastic_W2 = new TGeoVolume("volPassive_plastic_W2",Passive_plastic_W2,PBase);
307 volPassive_plastic_W2->SetLineColor(kMagenta+2);
308 volPassive_plastic_W2->SetVisibility(kTRUE);
309
310 float accumulatve_width = UpstreamPlasticThickness_W2; // testbeam 2024
311
312 for(Int_t n=0; n<NPlates; n++)
313 {
314 if (n==0 && testbeam_2024_setup){// testbeam 2024
315 volBrick->AddNode(volPassive_plastic, n,
316 new TGeoTranslation(0,0,-BrickZ/2 + UpstreamPlasticThickness/2));// upstream plastic
317 volBrick_W2->AddNode(volPassive_plastic_W2, n, new TGeoTranslation(0,0,-BrickZ/2 + UpstreamPlasticThickness_W2/2));// upstream plastic
318 }
319 if (n>=(NPlates-NTungstenPlatesTB24) || !testbeam_2024_setup) { // instrumented part for both TI18 and testbeam 2024
320 volBrick->AddNode(volPassive, n,
321 new TGeoTranslation(0,0,-BrickZ/2 + EmPlateWidth + PassiveThickness/2 + n*AllPlateWidth));// default(1x) plastic base thickness
322 if (testbeam_2024_setup){ // testbeam 2024
323 // interchange plastic plates of 1x or 4/3x default thickness
324 volBrick_W2->AddNode(volPassive, n,
325 new TGeoTranslation(0,0,-BrickZ/2 + (1+((n+1)%2)/3.)*EmPlateWidth + PassiveThickness/2 + accumulatve_width));
326 accumulatve_width+=(1+((n+1)%2)/3.)*EmPlateWidth + PassiveThickness;
327 }
328 }
329 }
330
331 TGeoBBox *EmulsionFilm = new TGeoBBox("EmulsionFilm", EmulsionX/2, EmulsionY/2, EmPlateWidth/2);
332 TGeoVolume *volEmulsionFilm = new TGeoVolume("Emulsion",EmulsionFilm,Emufilm); //TOP
333 volEmulsionFilm->SetLineColor(kBlue);
334 LOG(INFO) << "EmulsionDet : Passive option (0: all active, 1: all passive) set to " << fPassiveOption ;
335 if (fPassiveOption == 0) AddSensitiveVolume(volEmulsionFilm);
336 if (!testbeam_2024_setup){ // TI18
337 for(Int_t n=0; n<NPlates+1; n++)
338 {
339 volBrick->AddNode(volEmulsionFilm, n, new TGeoTranslation(0,0,-BrickZ/2+ EmPlateWidth/2 + n*AllPlateWidth));
340 }
341 }
342
343 volBrick->SetVisibility(kTRUE);
344 if (testbeam_2024_setup) { // testbeam 2024
345 volBrick_W2->SetVisibility(kTRUE);
346 }
347
348//alignment
349 double dx_survey[5] = {conf_floats["EmulsionDet/Xpos0"],conf_floats["EmulsionDet/Xpos1"],conf_floats["EmulsionDet/Xpos2"],conf_floats["EmulsionDet/Xpos3"],conf_floats["EmulsionDet/Xpos4"]};
350 double dy_survey[5] = {conf_floats["EmulsionDet/Ypos0"],conf_floats["EmulsionDet/Ypos1"],conf_floats["EmulsionDet/Ypos2"],conf_floats["EmulsionDet/Ypos3"],conf_floats["EmulsionDet/Ypos4"]};
351 double dz_survey[5] = {conf_floats["EmulsionDet/Zpos0"],conf_floats["EmulsionDet/Zpos1"],conf_floats["EmulsionDet/Zpos2"],conf_floats["EmulsionDet/Zpos3"],conf_floats["EmulsionDet/Zpos4"]};
352
353 top->AddNode(volTarget,1,new TGeoTranslation(0,0,0));
354
355 //adding walls
356
357 Double_t d_cl_z = - ZDimension/2;
358
359 if (!testbeam_2024_setup){
360 for(int l = 0; l < fNWall; l++) {
361 volTarget->AddNode(volWallborder,l,new TGeoTranslation(-dx_survey[l]-XDimension/2., dz_survey[l]+YDimension/2., dy_survey[l]+TotalWallZDim/2.)); //the survey points refer to the down-left corner
362 volTarget->AddNode(volWall,l,new TGeoTranslation(-dx_survey[l]-XDimension/2., dz_survey[l]+YDimension/2., dy_survey[l]+TotalWallZDim/2.+WallZBorder_offset)); //the survey points refer to the down-left corner
363 d_cl_z += BrickZ + TTrackerZ;
364 }
365 }
366 else { // testbeam 2024
367 volTarget->AddNode(volWallborder,0,new TGeoTranslation(-dx_survey[0]-XDimension/2., dz_survey[0]+YDimension/2., dy_survey[0]+TotalWallZDim/2.));
368 volTarget->AddNode(volWall,0,new TGeoTranslation(-dx_survey[0]-XDimension/2., dz_survey[0]+YDimension/2., dy_survey[0]+TotalWallZDim/2.+WallZBorder_offset));
369 d_cl_z += BrickZ + TTrackerZ;
370 volTarget->AddNode(volWallborder,1,new TGeoTranslation(-dx_survey[1]-XDimension/2., dz_survey[1]+YDimension/2., dy_survey[1]+TotalWallZDim/2.));
371 volTarget->AddNode(volWall_2,1,new TGeoTranslation(-dx_survey[1]-XDimension/2., dz_survey[1]+YDimension/2., dy_survey[1]+TotalWallZDim/2.+WallZBorder_offset));
372 d_cl_z += BrickZ + TTrackerZ;
373 }
374
375 //adding rows
376 Double_t d_cl_y = -WallYDim/2;
377
378 for(int k= 0; k< fNRow; k++)
379 {
380 volWall->AddNode(volRow,k,new TGeoTranslation(0, d_cl_y + BrickY/2,0));
381 if (testbeam_2024_setup){ // testbeam 2024
382 volWall_2->AddNode(volRow_W2,k,new TGeoTranslation(0, d_cl_y + BrickY/2,0));
383 }
384
385 // 2mm is the distance for the structure that holds the brick
386 d_cl_y += BrickY;
387 }
388
389 //adding columns of bricks
390 Double_t d_cl_x = -WallXDim/2;
391 for(int j= 0; j < fNCol; j++)
392 {
393 volRow->AddNode(volBrick,j,new TGeoTranslation(d_cl_x+BrickX/2, 0, 0));
394 if (testbeam_2024_setup){ // testbeam 2024
395 volRow_W2->AddNode(volBrick_W2,j,new TGeoTranslation(d_cl_x+BrickX/2, 0, 0));
396 }
397 d_cl_x += BrickX;
398 }
399}
Double_t PassiveThickness
Double_t BrickPackageZ
Int_t fPassiveOption
Double_t BrickPackageY
Double_t WallZBorder_offset
Double_t AllPlateWidth
Double_t TotalWallZDim
Double_t WallYDim
Double_t ShiftY
Double_t PlasticBaseThickness
Double_t TTrackerZ
Int_t InitMedium(const char *name)
Double_t WallXDim
Double_t EmPlateWidth
Double_t BrickY
Double_t ZDimension
Double_t BrickPackageX
Double_t EmulsionThickness
Double_t ShiftX
std::map< TString, Float_t > conf_floats
Definition EmulsionDet.h:93
Double_t XDimension
Definition EmulsionDet.h:99
Double_t BrickX
Double_t WallZDim
std::map< TString, Int_t > conf_ints
Definition EmulsionDet.h:94
Int_t number_of_plates
Double_t YDimension
Double_t BrickZ
Double_t EmulsionY
Double_t EmulsionX

◆ CopyClones()

virtual void EmulsionDet::CopyClones ( TClonesArray *  cl1,
TClonesArray *  cl2,
Int_t  offset 
)
inlinevirtual

Definition at line 53 of file EmulsionDet.h.

53{;}

◆ DecodeBrickID()

void EmulsionDet::DecodeBrickID ( Int_t  detID,
Int_t &  NWall,
Int_t &  NRow,
Int_t &  NColumn,
Int_t &  NPlate 
)

Obtain info about brick position from detectorID

Definition at line 121 of file EmulsionDet.cxx.

121 {
122
123 NWall = detID/1E4;
124 Int_t NTransverse = (detID - NWall*1E4)/1E3;
125 switch (NTransverse){
126 case (1):
127 NColumn = 1;
128 NRow = 2;
129 break;
130
131 case (2):
132 NColumn = 1;
133 NRow = 1;
134 break;
135
136 case (3):
137 NColumn = 2;
138 NRow = 2;
139 break;
140
141 case (4):
142 NColumn = 2;
143 NRow = 1;
144 break;
145 }
146
147 NPlate = detID - NWall*1E4 - NTransverse*1E3;
148
149
150}

◆ EndOfEvent()

void EmulsionDet::EndOfEvent ( )
virtual

Definition at line 485 of file EmulsionDet.cxx.

486{
488}

◆ FinishPrimary()

virtual void EmulsionDet::FinishPrimary ( )
inlinevirtual

Definition at line 56 of file EmulsionDet.h.

56{;}

◆ FinishRun()

virtual void EmulsionDet::FinishRun ( )
inlinevirtual

Definition at line 57 of file EmulsionDet.h.

57{;}

◆ GetCollection()

TClonesArray * EmulsionDet::GetCollection ( Int_t  iColl) const
virtual

Gets the produced collections

Definition at line 504 of file EmulsionDet.cxx.

505{
506 if (iColl == 0) { return fEmulsionDetPointCollection; }
507 else { return NULL; }
508}

◆ GetConfParF()

Float_t EmulsionDet::GetConfParF ( TString  name)
inline

Definition at line 70 of file EmulsionDet.h.

◆ GetConfParI()

Int_t EmulsionDet::GetConfParI ( TString  name)
inline

Definition at line 71 of file EmulsionDet.h.

71{return conf_ints[name];}

◆ GetConfParS()

TString EmulsionDet::GetConfParS ( TString  name)
inline

Definition at line 72 of file EmulsionDet.h.

72{return conf_strings[name];}
std::map< TString, TString > conf_strings
Definition EmulsionDet.h:95

◆ Initialize()

void EmulsionDet::Initialize ( )
virtual

Initialization of the detector is done here

Definition at line 95 of file EmulsionDet.cxx.

96{
97 FairDetector::Initialize();
98}

◆ InitMedium()

Int_t EmulsionDet::InitMedium ( const char *  name)
protected

Definition at line 101 of file EmulsionDet.cxx.

102{
103 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
104 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
105 static FairGeoMedia *media=geoFace->getMedia();
106 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
107
108 FairGeoMedium *ShipMedium=media->getMedium(name);
109
110 if (!ShipMedium)
111 {
112 Fatal("InitMedium","Material %s not defined in media file.", name);
113 return -1111;
114 }
115 TGeoMedium* medium=gGeoManager->GetMedium(name);
116 if (medium!=NULL)
117 return ShipMedium->getMediumIndex();
118 return geoBuild->createMedium(ShipMedium);
119}

◆ operator=()

EmulsionDet & EmulsionDet::operator= ( const EmulsionDet )

◆ PathBrickID()

TString EmulsionDet::PathBrickID ( Int_t  detID)

Definition at line 152 of file EmulsionDet.cxx.

152 {
153 //provide path to the node, from the detectorID
154 Int_t NWall, NRow, NColumn, NPlate;
155 DecodeBrickID(detID, NWall, NRow, NColumn, NPlate);
156
157 TString emulsionpath = TString::Format("/cave_1/Detector_0/volTarget_1/Wall_%i/Row_%i/Brick_%i/Emulsion_%i",NWall-1,NRow-1,NColumn-1,NPlate -1);
158
159 return emulsionpath;
160}
void DecodeBrickID(Int_t detID, Int_t &NWall, Int_t &NRow, Int_t &NColumn, Int_t &NPlate)

◆ PostTrack()

virtual void EmulsionDet::PostTrack ( )
inlinevirtual

Definition at line 59 of file EmulsionDet.h.

59{;}

◆ PreTrack()

virtual void EmulsionDet::PreTrack ( )
inlinevirtual

Definition at line 60 of file EmulsionDet.h.

60{;}

◆ ProcessHits()

Bool_t EmulsionDet::ProcessHits ( FairVolume *  v = 0)
virtual

Method called for each step during simulation (see FairMCApplication::Stepping())

This method is called from the MC stepping

Definition at line 405 of file EmulsionDet.cxx.

406{
408 //Set parameters at entrance of volume. Reset ELoss.
409 if ( gMC->IsTrackEntering() ) {
410 fELoss = 0.;
411 fTime = gMC->TrackTime() * 1.0e09;
412 fLength = gMC->TrackLength();
413 gMC->TrackPosition(fPos);
414 gMC->TrackMomentum(fMom);
415 }
416 // Sum energy loss for all steps in the active volume
417 fELoss += gMC->Edep();
418
419 // Create EmulsionDetPoint at exit of active volume
420 if ( gMC->IsTrackExiting() ||
421 gMC->IsTrackStop() ||
422 gMC->IsTrackDisappeared() ) {
423 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
424 gMC->CurrentVolID(fVolumeID);
425
426 //finding number of wall, row and column
427 Int_t detID = fVolumeID;
428 Int_t MaxLevel = gGeoManager->GetLevel();
429 const Int_t MaxL = MaxLevel;
430 //cout << "MaxLevel = " << MaxL << endl;
431 //cout << gMC->CurrentVolPath()<< endl;
432
433
434 Int_t motherV[MaxL];
435 Int_t NPlate =0;
436 const char *name;
437
438 name = gMC->CurrentVolName();
439 //cout << name << endl;
440 NPlate = detID;
441
442 Int_t NWall = -2, NColumn =-2, NRow =-2;
443
444 for(Int_t i = 0; i <= MaxL;i++)
445 {
446 gMC->CurrentVolOffID(i, motherV[i]);
447 const char *mumname = gMC->CurrentVolOffName(i);
448
449 if(strcmp(mumname, "Brick") == 0) NColumn = (1-motherV[i]); //0 or 1 (0 higher x, 1 lower x, x are negative, so higher x are closer to the beam)
450 if(strcmp(mumname, "Row") == 0) NRow = motherV[i]; // 0 or 1 (0 lower y, 1 higher y)
451 if(strcmp(mumname, "Wall") == 0) NWall = motherV[i]; //0,1,2,3 (increasing along the beam verse)
452
453 }
454
455 detID = (NWall+1)*1E4+(NRow*2+NColumn+1)*1E3+(NPlate+1);
456 fVolumeID = detID;
457 //found number of row, column and wall
458 //if (NColumn > 2 || NRow > 2 || NWall > 5) cout<<"Debug test for detID "<<detID<<" is "<<NColumn<<" "<<NRow<<" "<<NWall<<" "<<NPlate<<endl;
459 TParticle* p=gMC->GetStack()->GetCurrentTrack();
460 Int_t pdgCode = p->GetPdgCode();
461 if (pdgCode == 22) { return kFALSE; } //discard only photons
462
463 TLorentzVector Pos;
464 gMC->TrackPosition(Pos);
465 Double_t xmean = (fPos.X()+Pos.X())/2. ;
466 Double_t ymean = (fPos.Y()+Pos.Y())/2. ;
467 Double_t zmean = (fPos.Z()+Pos.Z())/2. ;
468
469 TLorentzVector Mom;
470 gMC->TrackMomentum(Mom);
471 AddHit(fTrackID, fVolumeID, TVector3(xmean, ymean, zmean),
472 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength,
473 fELoss,pdgCode,TVector3(Pos.X(), Pos.Y(), Pos.Z()),TVector3(Mom.Px(), Mom.Py(), Mom.Pz()) );
474
475 // Increment number of muon det points in TParticle
476 ShipStack* stack = (ShipStack*) gMC->GetStack();
477 stack->AddPoint(kEmulsionDet);
478 }
479
480 return kTRUE;
481}
EmulsionDetPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
int i
Definition ShipAna.py:86

◆ Register()

void EmulsionDet::Register ( )
virtual

Registers the produced collections in FAIRRootManager.

This will create a branch in the output tree called TargetPoint, setting the last parameter to kFALSE means: this collection will not be written to the file, it will exist only during the simulation.

Definition at line 491 of file EmulsionDet.cxx.

492{
493
500 FairRootManager::Instance()->Register("EmulsionDetPoint", "EmulsionDet",
502}

◆ Reset()

void EmulsionDet::Reset ( )
virtual

has to be called after each event to reset the containers

Definition at line 510 of file EmulsionDet.cxx.

511{
513}

◆ SetConfPar() [1/3]

void EmulsionDet::SetConfPar ( TString  name,
Float_t  value 
)
inline

Definition at line 67 of file EmulsionDet.h.

67{conf_floats[name]=value;}

◆ SetConfPar() [2/3]

void EmulsionDet::SetConfPar ( TString  name,
Int_t  value 
)
inline

Definition at line 68 of file EmulsionDet.h.

68{conf_ints[name]=value;}

◆ SetConfPar() [3/3]

void EmulsionDet::SetConfPar ( TString  name,
TString  value 
)
inline

Definition at line 69 of file EmulsionDet.h.

69{conf_strings[name]=value;}

◆ SetSpecialPhysicsCuts()

virtual void EmulsionDet::SetSpecialPhysicsCuts ( )
inlinevirtual

Definition at line 54 of file EmulsionDet.h.

54{;}

Member Data Documentation

◆ AllPlateWidth

Double_t EmulsionDet::AllPlateWidth
protected

Definition at line 121 of file EmulsionDet.h.

◆ BrickPackageX

Double_t EmulsionDet::BrickPackageX
protected

Definition at line 124 of file EmulsionDet.h.

◆ BrickPackageY

Double_t EmulsionDet::BrickPackageY
protected

Definition at line 125 of file EmulsionDet.h.

◆ BrickPackageZ

Double_t EmulsionDet::BrickPackageZ
protected

Definition at line 126 of file EmulsionDet.h.

◆ BrickX

Double_t EmulsionDet::BrickX
protected

Definition at line 130 of file EmulsionDet.h.

◆ BrickY

Double_t EmulsionDet::BrickY
protected

Definition at line 129 of file EmulsionDet.h.

◆ BrickZ

Double_t EmulsionDet::BrickZ
protected

Definition at line 128 of file EmulsionDet.h.

◆ conf_floats

std::map<TString,Float_t> EmulsionDet::conf_floats

configuration parameters

Definition at line 93 of file EmulsionDet.h.

◆ conf_ints

std::map<TString,Int_t> EmulsionDet::conf_ints

Definition at line 94 of file EmulsionDet.h.

◆ conf_strings

std::map<TString,TString> EmulsionDet::conf_strings

Definition at line 95 of file EmulsionDet.h.

◆ EmPlateWidth

Double_t EmulsionDet::EmPlateWidth
protected

Definition at line 120 of file EmulsionDet.h.

◆ EmulsionThickness

Double_t EmulsionDet::EmulsionThickness
protected

Definition at line 114 of file EmulsionDet.h.

◆ EmulsionX

Double_t EmulsionDet::EmulsionX
protected

Definition at line 115 of file EmulsionDet.h.

◆ EmulsionY

Double_t EmulsionDet::EmulsionY
protected

Definition at line 116 of file EmulsionDet.h.

◆ fELoss

Double32_t EmulsionDet::fELoss

length

Definition at line 88 of file EmulsionDet.h.

◆ fEmulsionDetPointCollection

TClonesArray* EmulsionDet::fEmulsionDetPointCollection

energy loss

container for data points

Definition at line 91 of file EmulsionDet.h.

◆ fLength

Double32_t EmulsionDet::fLength

time

Definition at line 87 of file EmulsionDet.h.

◆ fMom

TLorentzVector EmulsionDet::fMom

position at entrance

Definition at line 85 of file EmulsionDet.h.

◆ fNCol

Int_t EmulsionDet::fNCol
protected

Definition at line 103 of file EmulsionDet.h.

◆ fNRow

Int_t EmulsionDet::fNRow
protected

Definition at line 103 of file EmulsionDet.h.

◆ fNTarget

Int_t EmulsionDet::fNTarget
protected

Definition at line 104 of file EmulsionDet.h.

◆ fNWall

Int_t EmulsionDet::fNWall
protected

Definition at line 103 of file EmulsionDet.h.

◆ fPassiveOption

Int_t EmulsionDet::fPassiveOption
protected

Definition at line 132 of file EmulsionDet.h.

◆ fPos

TLorentzVector EmulsionDet::fPos

volume id

Definition at line 84 of file EmulsionDet.h.

◆ fTime

Double32_t EmulsionDet::fTime

momentum at entrance

Definition at line 86 of file EmulsionDet.h.

◆ fVolumeID

ClassDef (EmulsionDet,5) private Int_t EmulsionDet::fVolumeID

track index

Track information to be stored until the track leaves the active volume.

Definition at line 83 of file EmulsionDet.h.

◆ number_of_plates

Int_t EmulsionDet::number_of_plates
protected

Definition at line 105 of file EmulsionDet.h.

◆ PassiveThickness

Double_t EmulsionDet::PassiveThickness
protected

Definition at line 119 of file EmulsionDet.h.

◆ PlasticBaseThickness

Double_t EmulsionDet::PlasticBaseThickness
protected

Definition at line 118 of file EmulsionDet.h.

◆ ShiftX

Double_t EmulsionDet::ShiftX
protected

Definition at line 141 of file EmulsionDet.h.

◆ ShiftY

Double_t EmulsionDet::ShiftY
protected

Definition at line 139 of file EmulsionDet.h.

◆ TotalWallZDim

Double_t EmulsionDet::TotalWallZDim
protected

Definition at line 111 of file EmulsionDet.h.

◆ TTrackerZ

Double_t EmulsionDet::TTrackerZ
protected

Definition at line 136 of file EmulsionDet.h.

◆ WallXDim

Double_t EmulsionDet::WallXDim
protected

Definition at line 107 of file EmulsionDet.h.

◆ WallYDim

Double_t EmulsionDet::WallYDim
protected

Definition at line 108 of file EmulsionDet.h.

◆ WallZBorder_offset

Double_t EmulsionDet::WallZBorder_offset
protected

Definition at line 112 of file EmulsionDet.h.

◆ WallZDim

Double_t EmulsionDet::WallZDim
protected

Definition at line 109 of file EmulsionDet.h.

◆ XDimension

Double_t EmulsionDet::XDimension
protected

Definition at line 99 of file EmulsionDet.h.

◆ YDimension

Double_t EmulsionDet::YDimension
protected

Definition at line 100 of file EmulsionDet.h.

◆ ZDimension

Double_t EmulsionDet::ZDimension
protected

Definition at line 101 of file EmulsionDet.h.


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