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

#include <PndStt.h>

Inheritance diagram for PndStt:

Public Member Functions

 PndStt ()
 
 PndStt (const char *name, Bool_t active)
 
virtual ~PndStt ()
 
virtual void Initialize ()
 
virtual Bool_t ProcessHits (FairVolume *vol=0)
 
virtual void EndOfEvent ()
 
virtual void Register ()
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 
virtual void Print () const
 
virtual void Reset ()
 
virtual void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
 
virtual void ConstructGeometry ()
 
void SetDefaultSensorNames ()
 

Protected Member Functions

bool CheckIfSensitive (std::string name)
 

Protected Attributes

std::vector< std::string > fListOfSensitives
 

Private Member Functions

PndSttPointAddHit (Int_t trackID, Int_t detID, Int_t tubeID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass)
 
std::string GetStringPart (std::string &aSrc, Int_t part, char aDelim)
 
bool Split (std::string &aDest, std::string &aSrc, char aDelim)
 
void ResetParameters ()
 
float GetSquaredDistanceFromWire ()
 
 PndStt (const PndStt &L)
 
PndSttoperator= (const PndStt &)
 

Private Attributes

Int_t fTrackID
 
Int_t fVolumeID
 track index More...
 
TVector3 fPosInLocal
 volume id More...
 
TVector3 fPosOutLocal
 entry position in straw frame More...
 
TVector3 fMomIn
 exit position in straw frame More...
 
TVector3 fMomOut
 momentum More...
 
Double_t fTime
 momentum More...
 
Double_t fLength
 time More...
 
Double_t fELoss
 length More...
 
Double_t fMass
 energy loss More...
 
Bool_t fIsInitialized
 particle mass More...
 
Int_t fPosIndex
 
TClonesArray * fSttCollection
 
TVector3 fpostot
 Hit collection. More...
 
TVector3 fpostotin
 
TVector3 fpostotout
 
TObjArray * fPassNodes
 
Int_t fGeoType
 
Bool_t fInFlag
 

Detailed Description

Definition at line 34 of file PndStt.h.

Constructor & Destructor Documentation

PndStt::PndStt ( )

Default constructor

Definition at line 46 of file PndStt.cxx.

References fSttCollection.

47 : fTrackID(0), fVolumeID(0), fPosInLocal(0,0,0), fPosOutLocal(0,0,0),
48  fMomIn(0,0,0), fMomOut(0,0,0), fTime(0), fLength(0), fELoss(0), fMass(0), fIsInitialized(kFALSE), fPosIndex(0),
49  fSttCollection(0), fpostot(0,0,0), fpostotin(0,0,0), fpostotout(0,0,0), fPassNodes(new TObjArray()), fGeoType(0), fInFlag(0)
50 {
51  fSttCollection = new TClonesArray("PndSttPoint");
52  fVerboseLevel = 0;
53 }
Int_t fPosIndex
Definition: PndStt.h:138
Int_t fGeoType
Definition: PndStt.h:147
TObjArray * fPassNodes
Definition: PndStt.h:144
Double_t fELoss
length
Definition: PndStt.h:134
TVector3 fMomOut
momentum
Definition: PndStt.h:131
Int_t fVolumeID
track index
Definition: PndStt.h:127
Double_t fMass
energy loss
Definition: PndStt.h:135
Int_t fTrackID
Definition: PndStt.h:126
TVector3 fpostot
Hit collection.
Definition: PndStt.h:140
Double_t fTime
momentum
Definition: PndStt.h:132
TVector3 fPosInLocal
volume id
Definition: PndStt.h:128
TVector3 fpostotout
Definition: PndStt.h:142
TClonesArray * fSttCollection
Definition: PndStt.h:139
Bool_t fIsInitialized
particle mass
Definition: PndStt.h:136
TVector3 fpostotin
Definition: PndStt.h:141
Bool_t fInFlag
Definition: PndStt.h:150
Double_t fLength
time
Definition: PndStt.h:133
TVector3 fMomIn
exit position in straw frame
Definition: PndStt.h:130
TVector3 fPosOutLocal
entry position in straw frame
Definition: PndStt.h:129
PndStt::PndStt ( const char *  name,
Bool_t  active 
)

Standard constructor.

Parameters
namedetetcor name
activesensitivity flag

Definition at line 59 of file PndStt.cxx.

References fSttCollection.

60  : FairDetector(name, active),
61  fTrackID(0), fVolumeID(0), fPosInLocal(0,0,0), fPosOutLocal(0,0,0),
62  fMomIn(0,0,0), fMomOut(0,0,0), fTime(0), fLength(0), fELoss(0), fMass(0), fIsInitialized(kFALSE), fPosIndex(0),
63  fSttCollection(0), fpostot(0,0,0), fpostotin(0,0,0), fpostotout(0,0,0), fPassNodes(new TObjArray()), fGeoType(0), fInFlag(0)
64 {
65  fSttCollection = new TClonesArray("PndSttPoint");
66  fVerboseLevel = 0;
67 }
Int_t fPosIndex
Definition: PndStt.h:138
Int_t fGeoType
Definition: PndStt.h:147
TObjArray * fPassNodes
Definition: PndStt.h:144
Double_t fELoss
length
Definition: PndStt.h:134
TVector3 fMomOut
momentum
Definition: PndStt.h:131
Int_t fVolumeID
track index
Definition: PndStt.h:127
Double_t fMass
energy loss
Definition: PndStt.h:135
Int_t fTrackID
Definition: PndStt.h:126
TVector3 fpostot
Hit collection.
Definition: PndStt.h:140
Double_t fTime
momentum
Definition: PndStt.h:132
TVector3 fPosInLocal
volume id
Definition: PndStt.h:128
TString name
TVector3 fpostotout
Definition: PndStt.h:142
TClonesArray * fSttCollection
Definition: PndStt.h:139
Bool_t fIsInitialized
particle mass
Definition: PndStt.h:136
TVector3 fpostotin
Definition: PndStt.h:141
Bool_t fInFlag
Definition: PndStt.h:150
Double_t fLength
time
Definition: PndStt.h:133
TVector3 fMomIn
exit position in straw frame
Definition: PndStt.h:130
TVector3 fPosOutLocal
entry position in straw frame
Definition: PndStt.h:129
PndStt::~PndStt ( )
virtual

Destructor

Definition at line 74 of file PndStt.cxx.

References fSttCollection.

75 {
76  if (fSttCollection)
77  {
78  fSttCollection->Delete();
79  delete fSttCollection;
80  }
81 }
TClonesArray * fSttCollection
Definition: PndStt.h:139
PndStt::PndStt ( const PndStt L)
private

Member Function Documentation

PndSttPoint * PndStt::AddHit ( Int_t  trackID,
Int_t  detID,
Int_t  tubeID,
TVector3  pos,
TVector3  posInLocal,
TVector3  posOutLocal,
TVector3  momIn,
TVector3  momOut,
Double_t  time,
Double_t  length,
Double_t  eLoss,
Double_t  mass 
)
private

Private method AddHit

Adds a CbmTrdPoint to the HitCollection

Definition at line 422 of file PndStt.cxx.

References fSttCollection, and PndSttPoint::SetTubeID().

Referenced by ProcessHits().

426 {
427  TClonesArray&
428  clref = *fSttCollection;
429 
430  Int_t
431  size = clref.GetEntriesFast();
432 
433  PndSttPoint *pointnew = new(clref[size]) PndSttPoint(trackID, detID, pos, posInLocal, posOutLocal,
434  momIn, momOut, time,
435  length, eLoss, mass);
436  pointnew->SetTubeID(tubeID);
437  return pointnew;
438 }
TVector3 pos
void SetTubeID(Int_t tubeid)
Definition: PndSttPoint.h:76
TClonesArray * fSttCollection
Definition: PndStt.h:139
bool PndStt::CheckIfSensitive ( std::string  name)
protected

Definition at line 440 of file PndStt.cxx.

References fListOfSensitives, and i.

441 {
442  for (UInt_t i = 0; i < fListOfSensitives.size(); i++){
443  if (name.find(fListOfSensitives[i]) != std::string::npos)
444  return true;
445  }
446  return false;
447 }
Int_t i
Definition: run_full.C:25
std::vector< std::string > fListOfSensitives
Definition: PndStt.h:117
TString name
void PndStt::ConstructGeometry ( )
virtual

Virtual method Construct geometry

Constructs the STT geometry

Definition at line 347 of file PndStt.cxx.

References Bool_t, PndGeoHandling::CreateUniqueSensorId(), fGeoType, PndSttMapCreator::FillSttTubeParameters(), PndSttMapCreator::FillSttTubeParametersType2(), fListOfSensitives, fRun, geoFace, geoLoad, PndGeoHandling::Instance(), par, PndGeoHandling::PrintSensorNames(), rtdb, SetDefaultSensorNames(), and TString.

348 {
349  TString fileName = GetGeometryFileName();
350  if (fileName.EndsWith(".root"))
351  {
352  fGeoType = 2;
353  } else if (fileName.Contains("straws_skewed_blocks_35cm_pipe.geo"))
354  {
355  fGeoType = 1;
356  } else
357  {
358  cout << "-E- STT: this geometry is not supported now" << endl;
359  return;
360  }
361 
362  FairRun *fRun = FairRun::Instance();
363  FairRuntimeDb *rtdb = FairRun::Instance()->GetRuntimeDb();
364  PndGeoSttPar* par = (PndGeoSttPar*) (rtdb->getContainer("PndGeoSttPar"));
365  PndSttMapCreator mapper(fGeoType);
366  int tubecounter = 0;
367 
368  if (fGeoType == 2)
369  {
370  // Set what is sensitive before creating geometry
371  if (fListOfSensitives.size() == 0) SetDefaultSensorNames();
372  ConstructRootGeometry();
374  // if(fVerboseLevel>0)
376  // std::cout << "Inside fGeoType 2" << std::endl;
377  tubecounter = mapper.FillSttTubeParametersType2(par);
378 
379  } else if (fGeoType == 1)
380  {
381 
382  FairGeoLoader* geoLoad = FairGeoLoader::Instance();
383  FairGeoInterface* geoFace = geoLoad->getGeoInterface();
384  PndGeoStt* Geo = new PndGeoStt();
385  Geo->setGeomFile(GetGeometryFileName());
386  geoFace->addGeoModule(Geo);
387 
388  Bool_t rc = geoFace->readSet(Geo);
389  if (rc) Geo->create(geoLoad->getGeoBuilder());
390 
391  // store geo parameter with PndSttMapCreator
392  TList* volList = Geo->getListOfVolumes();
393  FairRun *fRun = FairRun::Instance();
394  FairRuntimeDb *rtdb = FairRun::Instance()->GetRuntimeDb();
395  PndGeoSttPar* par = (PndGeoSttPar*) (rtdb->getContainer("PndGeoSttPar"));
396  TListIter iter(volList);
397  // CHECK
398  if (GetGeometryFileName().Contains("straws_skewed_blocks_35cm_pipe.geo"))
399  fGeoType = 1;
400  else
401  cout << "-E- STT: this geometry is not supported now" << endl;
402 
403  PndSttMapCreator mapper(fGeoType);
404  int tubecounter = mapper.FillSttTubeParameters(par, volList);
405  cout << "-I- STT total number of tubes: " << tubecounter << endl;
406  par->setChanged();
407  par->setInputVersion(fRun->GetRunId(), 1);
408 
409  ProcessNodes(volList);
410  }
411  cout << "-I- PndStt::ConstructGeometry : STT total number of tubes: " << tubecounter << endl;
412  par->setChanged();
413  par->setInputVersion(fRun->GetRunId(), 1);
414 
415 }
Int_t fGeoType
Definition: PndStt.h:147
FairGeoLoader * geoLoad
void SetDefaultSensorNames()
Definition: PndStt.cxx:448
void CreateUniqueSensorId(TString startName, std::vector< std::string > listOfSensitives)
Has to be called during simulation to create unique sensor id.
Double_t par[3]
std::vector< std::string > fListOfSensitives
Definition: PndStt.h:117
FairRunAna * fRun
Definition: hit_dirc.C:58
void PrintSensorNames()
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
static PndGeoHandling * Instance()
FairGeoInterface * geoFace
void PndStt::CopyClones ( TClonesArray *  cl1,
TClonesArray *  cl2,
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 317 of file PndStt.cxx.

References fPosIndex, i, and offset().

318 {
319  Int_t
320  nEntries = cl1->GetEntriesFast();
321 
322  cout << "-I- PndStt: " << nEntries << " entries to add." << endl;
323 
324  TClonesArray& clref = *cl2;
325 
327  *oldpoint = NULL;
328  for (Int_t i=0; i<nEntries; i++)
329  {
330  oldpoint = (PndSttPoint*) cl1->At(i);
331 
332  Int_t
333  index = oldpoint->GetTrackID() + offset;
334 
335  oldpoint->SetTrackID(index);
336  new (clref[fPosIndex]) PndSttPoint(*oldpoint);
337  fPosIndex++;
338  }
339  cout << "-I- PndStt: " << cl2->GetEntriesFast() << " merged entries."
340  << endl;
341 }
Int_t fPosIndex
Definition: PndStt.h:138
Int_t i
Definition: run_full.C:25
TVector3 offset(2, 0, 0)
void PndStt::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 258 of file PndStt.cxx.

References fPosIndex, fSttCollection, and Print().

259 {
260  if (fVerboseLevel)
261  Print();
262  fSttCollection->Delete();
263  fPosIndex = 0;
264 }
Int_t fPosIndex
Definition: PndStt.h:138
virtual void Print() const
Definition: PndStt.cxx:291
TClonesArray * fSttCollection
Definition: PndStt.h:139
TClonesArray * PndStt::GetCollection ( Int_t  iColl) const
virtual

Accessor to the hit collection

Definition at line 279 of file PndStt.cxx.

References fSttCollection.

280 {
281  if (iColl == 0)
282  return fSttCollection;
283  else
284  return NULL;
285 }
TClonesArray * fSttCollection
Definition: PndStt.h:139
float PndStt::GetSquaredDistanceFromWire ( )
private

Private method GetSquaredDistanceFromWire

Returns the square of the distance of the current trackpoint to the wire

Returns
distance

Definition at line 98 of file PndStt.cxx.

99 {
100  TLorentzVector
101  entryPosition;
102 
103  float
104  positionInMother[3],
105  positionInStraw[3];
106 
107  gMC->TrackPosition(entryPosition);
108  positionInMother[0] = entryPosition.X();
109  positionInMother[1] = entryPosition.Y();
110  positionInMother[2] = entryPosition.Z();
111  gMC->Gmtod(positionInMother, positionInStraw, 1);
112 
113  return positionInStraw[0] * positionInStraw[0] +
114  positionInStraw[1] * positionInStraw[1];
115 }
string PndStt::GetStringPart ( std::string &  aSrc,
Int_t  part,
char  aDelim 
)
private

Definition at line 136 of file PndStt.cxx.

References counter, and Split().

137 {
138  string
139  retval = "",
140  sub;
141 
142  int
143  counter = 0;
144 
145  while(Split(sub, aSrc, aDelim))
146  {
147  if (counter == part)
148  {
149  retval = sub;
150  break;
151  }
152  counter++;
153  }
154 
155  return retval;
156 }
int counter
Definition: ZeeAnalysis.C:59
bool Split(std::string &aDest, std::string &aSrc, char aDelim)
Definition: PndStt.cxx:118
void PndStt::Initialize ( )
virtual

Definition at line 86 of file PndStt.cxx.

References gGeoManager, and Initialize().

87 {
88  std::cout << "-I- Initializing PndStt()" << std::endl;
89 
91  if(0==gGeoManager){
92  std::cout << " -E- No gGeoManager in PndStt::Initialize()! aborting" << std::endl;
93  abort();
94  }
95 }
TGeoManager * gGeoManager
Mvd Initialize()
PndStt& PndStt::operator= ( const PndStt )
inlineprivate

Definition at line 179 of file PndStt.h.

179 {return *this;};
void PndStt::Print ( ) const
virtual

Virtual method Print

Screen output of hit collection.

Definition at line 291 of file PndStt.cxx.

References fSttCollection, i, and nHits.

Referenced by EndOfEvent().

292 {
293  Int_t
294  nHits = fSttCollection->GetEntriesFast();
295 
296  cout << "-I- PndStt: " << nHits << " points registered in this event." << endl;
297 
298  if (fVerboseLevel>1)
299  for (Int_t i=0; i<nHits; i++)
300  (*fSttCollection)[i]->Print();
301 }
Int_t i
Definition: run_full.C:25
int nHits
Definition: RiemannTest.C:16
TClonesArray * fSttCollection
Definition: PndStt.h:139
Bool_t PndStt::ProcessHits ( FairVolume *  vol = 0)
virtual

Virtual method ProcessHits

Defines the action to be taken when a step is inside the active volume. Creates CbmTrdPoints and adds them to the collection.

Parameters
volPointer to the active volume

Definition at line 159 of file PndStt.cxx.

References AddHit(), PndStack::AddPoint(), Double_t, fELoss, fGeoType, fInFlag, fLength, fMass, fMomIn, fMomOut, fPosInLocal, fPosOutLocal, fpostot, fpostotin, fpostotout, fTime, fTrackID, fVolumeID, PndGeoHandling::GetShortID(), PndSttMapCreator::GetTubeIDFromPath(), PndGeoHandling::Instance(), kSTT, mom, name, ResetParameters(), and TString.

160 {
161  //new>>>>>>>>>>>>>>>>>>
162 
163  TString vol_name(gMC->CurrentVolName());
164  TGeoHMatrix M;
165  gMC->GetTransformation(gMC->CurrentVolPath(), M);
166  TString name(gMC->CurrentVolName());
167  //Bool_t skew = kFALSE; //[R.K. 01/2017] Unused variable.
168  //if(name.Contains("skew")) skew = kTRUE; //[R.K. 01/2017] Unused variable.
169  //new>>>>>>>>>>>>>>>>>>
170 
171 // TGeoMedium *medium = (TGeoMedium*) vol->getGeoNode()->getRootVolume()->GetMedium();
172 // Double_t epsil = medium->GetParam(6);
173 
174  Double_t globalPos[3] = { 0., 0., 0.};
175  Double_t localPos[3] = { 0., 0., 0. };
176  TLorentzVector mom;
177 
178  if (gMC->TrackCharge() != 0.)
179  {
180  if ( gMC->IsTrackEntering()) //not sure why this was here: && fabs(sqrt(GetSquaredDistanceFromWire()) - (innerStrawDiameter / 2.)) < epsil)
181  {
182  fInFlag = kTRUE;
183  // Set parameters at entrance of volume. Reset ELoss.
184  fELoss = 0.;
185  fTime = gMC->TrackTime() * 1.0e09;
186  fLength = gMC->TrackLength();
187  gMC->TrackPosition(globalPos[0], globalPos[1], globalPos[2]);
188  gMC->TrackMomentum(mom);
189 
190  fpostotin.SetXYZ(globalPos[0], globalPos[1], globalPos[2]);
191  fMomIn.SetXYZ(mom.X(), mom.Y(), mom.Z());
192 
193  gMC->Gmtod(globalPos, localPos, 1);
194  fPosInLocal.SetXYZ(localPos[0], localPos[1], localPos[2]);
195  }
196 
197  // Sum energy loss for all steps in the active volume
198  fELoss += gMC->Edep();
199 
200  // Create PndSttPoint at exit of active volume -- but not into the wire -- with eloss in the tube (to make it work with TGeant4)
201  if ( (gMC->IsTrackExiting() || gMC->IsTrackStop() || gMC->IsTrackDisappeared())
202  && fInFlag == kTRUE // not sure why this was here: fabs(sqrt(GetSquaredDistanceFromWire()) - (innerStrawDiameter / 2.)) < epsil
203  && fELoss != 0)
204  {
205  fInFlag = kFALSE;
206  fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
207  fVolumeID = kSTT; // vol->getMCid();
208  fMass = gMC->TrackMass(); // mass (GeV)
209  gMC->TrackPosition(globalPos[0], globalPos[1], globalPos[2]);
210  gMC->TrackMomentum(mom);
211 
212  fpostotout.SetXYZ(globalPos[0], globalPos[1], globalPos[2]);
213  fMomOut.SetXYZ(mom.X(), mom.Y(), mom.Z());
214 
215  gMC->Gmtod(globalPos, localPos, 1);
216  fPosOutLocal.SetXYZ(localPos[0], localPos[1], localPos[2]);
217 
218 
219  fpostot.SetXYZ((fpostotin.X() + fpostotout.X()) / 2., (fpostotin.Y() + fpostotout.Y()) / 2.,
220  (fpostotin.Z() + fpostotout.Z()) / 2.); // CHECK (delete this?)
221 
222  Int_t tubeID = -1;
223 
224  // CHECK -----------------------------------------------------------
225  if (fGeoType == 1){
226  PndSttMapCreator mapper(fGeoType);
227  tubeID = mapper.GetTubeIDFromPath(gMC->CurrentVolPath());
228  } else if (fGeoType == 2) {
229  tubeID = PndGeoHandling::Instance()->GetShortID(gMC->CurrentVolPath());
230  }
231  // -----------------------------------------------------------------
232 
233 // std::cout << "SttPoint: " << gMC->CurrentVolPath() << std::endl;
234 // std::cout << "PosIn: " << fpostotin.X() << "/" << fpostotin.Y() << "/" << fpostotin.Z() << std::endl;
235 // std::cout << "PosOut: " << fpostotout.X() << "/" << fpostotout.Y() << "/" << fpostotout.Z() << std::endl;
236 // std::cout << "PosToT: " << fpostot.X() << "/" << fpostot.Y() << "/" << fpostot.Z() << std::endl;
237 // std::cout << "PosInLoc: " << fPosInLocal.X() << "/" << fPosInLocal.Y() << "/" << fPosInLocal.Z() << std::endl;
238 // std::cout << "PosOutLoc: " << fPosOutLocal.X() << "/" << fPosOutLocal.Y() << "/" << fPosOutLocal.Z() << std::endl;
239 
240  AddHit(fTrackID, fVolumeID, tubeID, fpostot,
243 
244  // Increment number of stt points for TParticle
245  PndStack* stack = (PndStack*) gMC->GetStack();
246  stack->AddPoint(kSTT);
247  ResetParameters();
248  }
249  }
250 
251  return kTRUE;
252 }
Int_t fGeoType
Definition: PndStt.h:147
Double_t fELoss
length
Definition: PndStt.h:134
TVector3 fMomOut
momentum
Definition: PndStt.h:131
Double_t mom
Definition: plot_dirc.C:14
void ResetParameters()
Definition: PndStt.h:186
Int_t fVolumeID
track index
Definition: PndStt.h:127
void AddPoint(DetectorId iDet)
Definition: PndStack.cxx:408
Double_t fMass
energy loss
Definition: PndStt.h:135
Int_t fTrackID
Definition: PndStt.h:126
PndSttPoint * AddHit(Int_t trackID, Int_t detID, Int_t tubeID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass)
Definition: PndStt.cxx:422
Double_t
TVector3 fpostot
Hit collection.
Definition: PndStt.h:140
Double_t fTime
momentum
Definition: PndStt.h:132
TVector3 fPosInLocal
volume id
Definition: PndStt.h:128
Int_t GetShortID(TString path)
for a given path the (unique) position of the sensor path in the fSensorNamePar-List is given...
static PndGeoHandling * Instance()
TString name
TVector3 fpostotout
Definition: PndStt.h:142
TVector3 fpostotin
Definition: PndStt.h:141
Bool_t fInFlag
Definition: PndStt.h:150
Double_t fLength
time
Definition: PndStt.h:133
TVector3 fMomIn
exit position in straw frame
Definition: PndStt.h:130
TVector3 fPosOutLocal
entry position in straw frame
Definition: PndStt.h:129
void PndStt::Register ( )
virtual

Virtual method Register

Registers the hit collection in the ROOT manager.

Definition at line 270 of file PndStt.cxx.

References fSttCollection.

271 {
272  FairRootManager::Instance()->Register("STTPoint", "Stt", fSttCollection, kTRUE);
273 }
TClonesArray * fSttCollection
Definition: PndStt.h:139
void PndStt::Reset ( )
virtual

Virtual method Reset

Clears the hit collection

Definition at line 307 of file PndStt.cxx.

References fSttCollection, and ResetParameters().

308 {
309  fSttCollection->Delete();
310  ResetParameters();
311 }
void ResetParameters()
Definition: PndStt.h:186
TClonesArray * fSttCollection
Definition: PndStt.h:139
void PndStt::ResetParameters ( )
inlineprivate

Private method ResetParameters

Resets the private members for the track parameters

Definition at line 186 of file PndStt.h.

References fELoss, fLength, fMass, fMomIn, fMomOut, fPosIndex, fPosInLocal, fPosOutLocal, fpostot, fpostotin, fpostotout, fTime, fTrackID, and fVolumeID.

Referenced by ProcessHits(), and Reset().

186  {
187  fTrackID = fVolumeID = 0;
188  fPosInLocal.SetXYZ(0.0, 0.0, 0.0);
189  fPosOutLocal.SetXYZ(0.0, 0.0, 0.0);
190  fMomIn.SetXYZ(0.0, 0.0, 0.0);
191  fMomOut.SetXYZ(0.0, 0.0, 0.0);
192  fTime = fLength = fELoss = 0;
193  fPosIndex = 0;
194  fpostot.SetXYZ(0.0, 0.0, 0.0); // da cancellare
195  fpostotin.SetXYZ(0.0, 0.0, 0.0); // da cancellare
196  fpostotout.SetXYZ(0.0, 0.0, 0.0); // da cancellare
197  fMass = 0;
198 }
Int_t fPosIndex
Definition: PndStt.h:138
Double_t fELoss
length
Definition: PndStt.h:134
TVector3 fMomOut
momentum
Definition: PndStt.h:131
Int_t fVolumeID
track index
Definition: PndStt.h:127
Double_t fMass
energy loss
Definition: PndStt.h:135
Int_t fTrackID
Definition: PndStt.h:126
TVector3 fpostot
Hit collection.
Definition: PndStt.h:140
Double_t fTime
momentum
Definition: PndStt.h:132
TVector3 fPosInLocal
volume id
Definition: PndStt.h:128
TVector3 fpostotout
Definition: PndStt.h:142
TVector3 fpostotin
Definition: PndStt.h:141
Double_t fLength
time
Definition: PndStt.h:133
TVector3 fMomIn
exit position in straw frame
Definition: PndStt.h:130
TVector3 fPosOutLocal
entry position in straw frame
Definition: PndStt.h:129
void PndStt::SetDefaultSensorNames ( )

Definition at line 448 of file PndStt.cxx.

References fListOfSensitives.

Referenced by ConstructGeometry().

448  {
449  fListOfSensitives.push_back("ArCO2Sensitive");//Root_Test.root
450 
451  if (fVerboseLevel>0) {
452  std::cout<<"- I - PndSTTDetector: fListOfSensitives contains:";
453  for(UInt_t k=0;k<fListOfSensitives.size();k++)
454  std::cout<<"\n\t"<<fListOfSensitives[k];
455  std::cout<<std::endl;
456  }
457 }
std::vector< std::string > fListOfSensitives
Definition: PndStt.h:117
bool PndStt::Split ( std::string &  aDest,
std::string &  aSrc,
char  aDelim 
)
private

Definition at line 118 of file PndStt.cxx.

References pos.

Referenced by GetStringPart().

119 {
120  if(aSrc.empty())
121  return false;
122 
123  string::size_type
124  pos = aSrc.find(aDelim);
125 
126  aDest = aSrc.substr(0, pos);
127 
128  if(pos != string::npos)
129  aSrc = aSrc.substr(pos + 1);
130  else
131  aSrc = "";
132 
133  return true;
134 }
TVector3 pos

Member Data Documentation

Double_t PndStt::fELoss
private

length

Definition at line 134 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndStt::fGeoType
private

Definition at line 147 of file PndStt.h.

Referenced by ConstructGeometry(), and ProcessHits().

Bool_t PndStt::fInFlag
private

Definition at line 150 of file PndStt.h.

Referenced by ProcessHits().

Bool_t PndStt::fIsInitialized
private

particle mass

Definition at line 136 of file PndStt.h.

Double_t PndStt::fLength
private

time

Definition at line 133 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

std::vector<std::string> PndStt::fListOfSensitives
protected

Definition at line 117 of file PndStt.h.

Referenced by CheckIfSensitive(), ConstructGeometry(), and SetDefaultSensorNames().

Double_t PndStt::fMass
private

energy loss

Definition at line 135 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fMomIn
private

exit position in straw frame

Definition at line 130 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fMomOut
private

momentum

Definition at line 131 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TObjArray* PndStt::fPassNodes
private

Definition at line 144 of file PndStt.h.

Int_t PndStt::fPosIndex
private

Definition at line 138 of file PndStt.h.

Referenced by CopyClones(), EndOfEvent(), and ResetParameters().

TVector3 PndStt::fPosInLocal
private

volume id

Definition at line 128 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fPosOutLocal
private

entry position in straw frame

Definition at line 129 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fpostot
private

Hit collection.

Definition at line 140 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fpostotin
private

Definition at line 141 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TVector3 PndStt::fpostotout
private

Definition at line 142 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

TClonesArray* PndStt::fSttCollection
private

Definition at line 139 of file PndStt.h.

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

Double_t PndStt::fTime
private

momentum

Definition at line 132 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndStt::fTrackID
private

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

Definition at line 126 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndStt::fVolumeID
private

track index

Definition at line 127 of file PndStt.h.

Referenced by ProcessHits(), and ResetParameters().


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