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

#include <PndFts.h>

Inheritance diagram for PndFts:

Public Member Functions

 PndFts ()
 
 PndFts (const char *name, Bool_t active)
 
virtual ~PndFts ()
 
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 ()
 
void Initialize ()
 
virtual void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
 
virtual void ConstructGeometry ()
 

Private Member Functions

PndFtsPointAddHit (Int_t trackID, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, 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 ()
 
 PndFts (const PndFts &L)
 
PndFtsoperator= (const PndFts &)
 

Private Attributes

Int_t fTrackID
 
Int_t fVolumeID
 track index More...
 
TLorentzVector fPos
 volume id More...
 
TLorentzVector fPosIn
 wire position in global frame More...
 
TLorentzVector fPosOut
 entry position in global frame More...
 
TLorentzVector fPosInLocal
 exit position in global frame More...
 
TLorentzVector fPosOutLocal
 entry position in straw frame More...
 
TLorentzVector fMomIn
 exit position in straw frame More...
 
TLorentzVector 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 * fFtsCollection
 
TLorentzVector fpostot
 Hit collection. More...
 
TLorentzVector fpostotin
 
TLorentzVector fpostotout
 
TObjArray * fPassNodes
 
Bool_t valid
 
Int_t fGeoType
 
PndFtsMapCreatorfMapper
 

Detailed Description

Definition at line 25 of file PndFts.h.

Constructor & Destructor Documentation

PndFts::PndFts ( )

Default constructor

Definition at line 43 of file PndFts.cxx.

References fFtsCollection.

44  : fTrackID(0), fVolumeID(0), fPos(0,0,0,0), fPosIn(0,0,0,0), fPosOut(0,0,0,0), fPosInLocal(0,0,0,0), fPosOutLocal(0,0,0,0),
45  fMomIn(0,0,0,0), fMomOut(0,0,0,0), fTime(0), fLength(0), fELoss(0), fMass(0), fIsInitialized(kFALSE), fPosIndex(0),
46  fFtsCollection(0), fpostot(0,0,0,0), fpostotin(0,0,0,0), fpostotout(0,0,0,0), fPassNodes(), valid(kFALSE), fGeoType(0)
47 {
48  fFtsCollection = new TClonesArray("PndFtsPoint");
49  fVerboseLevel = 0;
50 }
Bool_t valid
Definition: PndFts.h:135
TLorentzVector fpostot
Hit collection.
Definition: PndFts.h:129
Int_t fVolumeID
track index
Definition: PndFts.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts.h:116
Int_t fPosIndex
Definition: PndFts.h:127
TClonesArray * fFtsCollection
Definition: PndFts.h:128
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts.h:117
Bool_t fIsInitialized
particle mass
Definition: PndFts.h:125
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts.h:115
Int_t fTrackID
Definition: PndFts.h:112
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts.h:119
Double_t fELoss
length
Definition: PndFts.h:123
TLorentzVector fpostotin
Definition: PndFts.h:130
TLorentzVector fpostotout
Definition: PndFts.h:131
Int_t fGeoType
Definition: PndFts.h:136
TObjArray * fPassNodes
Definition: PndFts.h:133
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts.h:118
Double_t fLength
time
Definition: PndFts.h:122
Double_t fMass
energy loss
Definition: PndFts.h:124
Double_t fTime
momentum
Definition: PndFts.h:121
TLorentzVector fPos
volume id
Definition: PndFts.h:114
TLorentzVector fMomOut
momentum
Definition: PndFts.h:120
PndFts::PndFts ( const char *  name,
Bool_t  active 
)

Standard constructor.

Parameters
namedetetcor name
activesensitivity flag

Definition at line 56 of file PndFts.cxx.

References fFtsCollection.

57  : FairDetector(name, active), fTrackID(0), fVolumeID(0), fPos(0,0,0,0), fPosIn(0,0,0,0), fPosOut(0,0,0,0), fPosInLocal(0,0,0,0), fPosOutLocal(0,0,0,0),
58  fMomIn(0,0,0,0), fMomOut(0,0,0,0), fTime(0), fLength(0), fELoss(0), fMass(0), fIsInitialized(kFALSE), fPosIndex(0),
59  fFtsCollection(0), fpostot(0,0,0,0), fpostotin(0,0,0,0), fpostotout(0,0,0,0), fPassNodes(), valid(kFALSE), fGeoType(0)
60 {
61  fFtsCollection = new TClonesArray("PndFtsPoint");
62  fVerboseLevel = 0;
63 }
Bool_t valid
Definition: PndFts.h:135
TLorentzVector fpostot
Hit collection.
Definition: PndFts.h:129
Int_t fVolumeID
track index
Definition: PndFts.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts.h:116
Int_t fPosIndex
Definition: PndFts.h:127
TClonesArray * fFtsCollection
Definition: PndFts.h:128
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts.h:117
Bool_t fIsInitialized
particle mass
Definition: PndFts.h:125
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts.h:115
Int_t fTrackID
Definition: PndFts.h:112
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts.h:119
Double_t fELoss
length
Definition: PndFts.h:123
TLorentzVector fpostotin
Definition: PndFts.h:130
TLorentzVector fpostotout
Definition: PndFts.h:131
Int_t fGeoType
Definition: PndFts.h:136
TObjArray * fPassNodes
Definition: PndFts.h:133
TString name
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts.h:118
Double_t fLength
time
Definition: PndFts.h:122
Double_t fMass
energy loss
Definition: PndFts.h:124
Double_t fTime
momentum
Definition: PndFts.h:121
TLorentzVector fPos
volume id
Definition: PndFts.h:114
TLorentzVector fMomOut
momentum
Definition: PndFts.h:120
PndFts::~PndFts ( )
virtual

Destructor

Definition at line 70 of file PndFts.cxx.

References fFtsCollection.

71 {
72  if (fFtsCollection)
73  {
74  fFtsCollection->Delete();
75  delete fFtsCollection;
76  }
77 }
TClonesArray * fFtsCollection
Definition: PndFts.h:128
PndFts::PndFts ( const PndFts L)
private

Member Function Documentation

PndFtsPoint * PndFts::AddHit ( Int_t  trackID,
Int_t  detID,
Int_t  tubeID,
Int_t  chamberID,
Int_t  layerID,
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 469 of file PndFts.cxx.

References fFtsCollection, PndFtsPoint::SetChamberID(), PndFtsPoint::SetLayerID(), and PndFtsPoint::SetTubeID().

Referenced by ProcessHits().

473 {
474  TClonesArray&
475  clref = *fFtsCollection;
476 
477  Int_t
478  size = clref.GetEntriesFast();
479 
480  PndFtsPoint *pointnew = new(clref[size]) PndFtsPoint(trackID, detID, tubeID, chamberID, layerID, pos, posInLocal, posOutLocal,momIn, momOut, time, length, eLoss, mass);
481 
482  pointnew->SetTubeID(tubeID);
483  pointnew->SetChamberID(chamberID);
484  pointnew->SetLayerID(layerID);
485 
486  return pointnew;
487 }
TVector3 pos
TClonesArray * fFtsCollection
Definition: PndFts.h:128
void SetLayerID(Int_t layerid)
Definition: PndFtsPoint.h:88
void SetChamberID(Int_t chamberid)
Definition: PndFtsPoint.h:87
void SetTubeID(Int_t tubeid)
Definition: PndFtsPoint.h:85
void PndFts::ConstructGeometry ( )
virtual

Virtual method Construct geometry

Constructs the STT geometry

Definition at line 413 of file PndFts.cxx.

References Bool_t, fGeoType, fMapper, fPassNodes, fRun, geoFace, geoLoad, PndGeoFtsPar::GetGeoPassiveNodes(), PndGeoFtsPar::GetGeoSensitiveNodes(), par, rtdb, PndGeoFtsPar::SetGeometryType(), PndGeoFtsPar::SetTubeInRad(), and PndGeoFtsPar::SetTubeOutRad().

414 {
415  FairGeoLoader* geoLoad = FairGeoLoader::Instance();
416  FairGeoInterface* geoFace = geoLoad->getGeoInterface();
417  PndGeoFts* Geo = new PndGeoFts();
418  Geo->setGeomFile(GetGeometryFileName());
419  geoFace->addGeoModule(Geo);
420 
421  Bool_t rc = geoFace->readSet(Geo);
422  if (rc) Geo->create(geoLoad->getGeoBuilder());
423 
424  TList* volList = Geo->getListOfVolumes();
425 
426  // store geo parameter
427  FairRun *fRun = FairRun::Instance();
428  FairRuntimeDb *rtdb= FairRun::Instance()->GetRuntimeDb();
429  PndGeoFtsPar* par=(PndGeoFtsPar*)(rtdb->getContainer("PndGeoFtsPar"));
430  TObjArray *fSensNodes = par->GetGeoSensitiveNodes();
432 
433  TListIter iter(volList);
434  FairGeoNode* node = NULL;
435  FairGeoVolume *aVol=NULL;
436 
437 
438  while( (node = (FairGeoNode*)iter.Next()) ) {
439  aVol = dynamic_cast<FairGeoVolume*> ( node );
440  if ( node->isSensitive() ) {
441  fSensNodes->AddLast( aVol );
442  }else{
443  fPassNodes->AddLast( aVol );
444  }
445  }
446 
447  //std::cout<<"BBBB->"<<fSensNodes->GetEntries()<<std::endl;
448  //std::cout<<"cccc->"<<fPassNodes->GetEntries()<<std::endl;
449 
450  fGeoType = 1; // CHECK
452  par->SetTubeInRad(0.5); // cm
453  par->SetTubeOutRad(0.001); // cm
454 
455 
456  par->setChanged();
457  par->setInputVersion(fRun->GetRunId(),1);
458  ProcessNodes ( volList );
459 
461 
462 }
FairGeoLoader * geoLoad
Double_t par[3]
void SetTubeInRad(Double_t inrad)
Definition: PndGeoFtsPar.h:35
FairRunAna * fRun
Definition: hit_dirc.C:58
void SetTubeOutRad(Double_t outrad)
Definition: PndGeoFtsPar.h:36
Int_t fGeoType
Definition: PndFts.h:136
TObjArray * fPassNodes
Definition: PndFts.h:133
PndFtsMapCreator * fMapper
Definition: PndFts.h:138
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
TObjArray * GetGeoPassiveNodes()
Definition: PndGeoFtsPar.h:31
void SetGeometryType(Int_t geoType)
Definition: PndGeoFtsPar.h:34
FairGeoInterface * geoFace
TObjArray * GetGeoSensitiveNodes()
Definition: PndGeoFtsPar.h:30
void PndFts::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 377 of file PndFts.cxx.

References fPosIndex, i, and offset().

378 {
379  Int_t
380  nEntries = cl1->GetEntriesFast();
381 
382  cout << "-I- PndFts: " << nEntries << " entries to add." << endl;
383 
384  TClonesArray& clref = *cl2;
385 
387  *oldpoint = NULL;
388  for (Int_t i=0; i<nEntries; i++)
389  {
390  oldpoint = (PndFtsPoint*) cl1->At(i);
391 
392  Int_t
393  index = oldpoint->GetTrackID() + offset;
394 
395  oldpoint->SetTrackID(index);
396  new (clref[fPosIndex]) PndFtsPoint(*oldpoint);
397  fPosIndex++;
398  }
399  cout << "-I- PndFts: " << cl2->GetEntriesFast() << " merged entries."
400  << endl;
401 }
Int_t i
Definition: run_full.C:25
Int_t fPosIndex
Definition: PndFts.h:127
TVector3 offset(2, 0, 0)
void PndFts::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 318 of file PndFts.cxx.

References fFtsCollection, fPosIndex, and Print().

319 {
320  if (fVerboseLevel)
321  Print();
322  fFtsCollection->Delete();
323  fPosIndex = 0;
324 }
Int_t fPosIndex
Definition: PndFts.h:127
TClonesArray * fFtsCollection
Definition: PndFts.h:128
virtual void Print() const
Definition: PndFts.cxx:351
TClonesArray * PndFts::GetCollection ( Int_t  iColl) const
virtual

Accessor to the hit collection

Definition at line 339 of file PndFts.cxx.

References fFtsCollection.

340 {
341  if (iColl == 0)
342  return fFtsCollection;
343  else
344  return NULL;
345 }
TClonesArray * fFtsCollection
Definition: PndFts.h:128
float PndFts::GetSquaredDistanceFromWire ( )
private

Private method GetSquaredDistanceFromWire

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

Returns
distance

Definition at line 82 of file PndFts.cxx.

83 {
84  TLorentzVector
85  entryPosition;
86 
87  float
88  positionInMother[3],
89  positionInStraw[3];
90 
91  gMC->TrackPosition(entryPosition);
92  positionInMother[0] = entryPosition.X();
93  positionInMother[1] = entryPosition.Y();
94  positionInMother[2] = entryPosition.Z();
95  gMC->Gmtod(positionInMother, positionInStraw, 1);
96 
97  return positionInStraw[0] * positionInStraw[0] +
98  positionInStraw[1] * positionInStraw[1];
99 }
string PndFts::GetStringPart ( std::string &  aSrc,
Int_t  part,
char  aDelim 
)
private

Definition at line 120 of file PndFts.cxx.

References counter, and Split().

Referenced by ProcessHits().

121 {
122  string
123  retval = "",
124  sub;
125 
126  int
127  counter = 0;
128 
129  while(Split(sub, aSrc, aDelim))
130  {
131  if (counter == part)
132  {
133  retval = sub;
134  break;
135  }
136  counter++;
137  }
138 
139  return retval;
140 }
bool Split(std::string &aDest, std::string &aSrc, char aDelim)
Definition: PndFts.cxx:102
int counter
Definition: ZeeAnalysis.C:59
void PndFts::Initialize ( )

Definition at line 404 of file PndFts.cxx.

References Initialize().

404  {
405  cout << " -I- Initializing PndFts()" <<endl;
407 
408 }
Mvd Initialize()
PndFts& PndFts::operator= ( const PndFts )
inlineprivate

Definition at line 167 of file PndFts.h.

167 {return *this;}
void PndFts::Print ( ) const
virtual

Virtual method Print

Screen output of hit collection.

Definition at line 351 of file PndFts.cxx.

References fFtsCollection, i, and nHits.

Referenced by EndOfEvent().

352 {
353  Int_t
354  nHits = fFtsCollection->GetEntriesFast();
355 
356  cout << "-I- PndFts: " << nHits << " points registered in this event." << endl;
357 
358  if (fVerboseLevel>1)
359  for (Int_t i=0; i<nHits; i++)
360  (*fFtsCollection)[i]->Print();
361 }
Int_t i
Definition: run_full.C:25
TClonesArray * fFtsCollection
Definition: PndFts.h:128
int nHits
Definition: RiemannTest.C:16
Bool_t PndFts::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 143 of file PndFts.cxx.

References AddHit(), PndStack::AddPoint(), Double_t, fELoss, fLength, fMapper, fMass, fMomIn, fMomOut, fPassNodes, fPos, fPosInLocal, fPosOut, fPosOutLocal, fpostot, fpostotin, fpostotout, fTime, fTrackID, fVolumeID, PndFtsMapCreator::GetChamberIDFromPath(), PndFtsMapCreator::GetLayerID(), GetStringPart(), PndFtsMapCreator::GetTubeIDFromPath(), PndFtsMapCreator::GetTubeIDTot(), kFTS, name, ResetParameters(), TString, and valid.

144 {
145 
146 
147  //std::cout<<"ProcessHit PndFts####################################################"<<std::endl;
148 
149  //TParticle* particle = gMC->GetStack()->GetCurrentTrack(); //[R.K. 01/2017] unused variable?
150  //TGeoMedium *medium = (TGeoMedium*) vol->getGeoNode()->getRootVolume()->GetMedium(); //[R.K. 01/2017] unused variable?
151  //Double_t epsil = medium->GetParam(6); //[R.K. 01/2017] unused variable?
152 
153  TString vol_name(gMC->CurrentVolName());
154  TGeoHMatrix M;
155  gMC->GetTransformation(gMC->CurrentVolPath(),M);
156  TString name(gMC->CurrentVolName());
157 
158 
159  if (gMC->TrackCharge() != 0.)
160  {
161 
162  if ( gMC->IsTrackEntering() )
163  {
164  valid = kTRUE;
165 
166  // Set parameters at entrance of volume. Reset ELoss.
167  fELoss = 0.;
168  fTime = gMC->TrackTime() * 1.0e09;
169  fLength = gMC->TrackLength();
170  gMC->TrackPosition(fPos);
171  gMC->TrackMomentum(fMomIn);
172  gMC->TrackPosition(fpostotin);// da cancellare
173  Double_t globalPos[3] = {0., 0., 0.}; // stt1 modified
174  Double_t localPos[3] = {0., 0., 0.}; // stt1 modified
175 
176  globalPos[0] = fPos.X();
177  globalPos[1] = fPos.Y();
178  globalPos[2] = fPos.Z();
179 
180  gMC->Gmtod(globalPos, localPos, 1);
181  fPosInLocal.SetXYZM(localPos[0], localPos[1], localPos[2], 0.0);
182 
183  }
184 
185  // Sum energy loss for all steps in the active volume
186  fELoss += gMC->Edep();
187 
188  //std::cout<<"bool valid = "<<valid<<std::endl;
189 
190  // Create PndFtsPoint at exit of active volume -- but not into the wire
191  if ( gMC->IsTrackExiting() && valid==kTRUE )
192  {
193  //std::cout<<"sono nel ciclo"<<std::endl;
194  valid=kFALSE;
195  fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
196  fVolumeID = kFTS;//vol->getMCid();
197 
198  if(fTrackID !=0){
199  if (fVerboseLevel>2) std::cout<<"test Vol----------"<<vol->getMCid()<<std::endl;
200  if (fVerboseLevel>2) std::cout<<"fTrackID-----"<<fTrackID<<std::endl;
201  }
202 
203  fMass = gMC->TrackMass(); // mass (GeV)
204  gMC->TrackPosition(fPosOut);
205  gMC->TrackMomentum(fMomOut);
206  gMC->TrackPosition(fpostotout);// da cancellare
207  Double_t globalPos[3] = {0., 0., 0.}; // stt1 modified
208  Double_t localPos[3] = {0., 0., 0.}; // stt1 modified
209 
210  gMC->Gdtom(localPos, globalPos, 1);
211 
212  fPos.SetXYZM(globalPos[0], globalPos[1], globalPos[2], 0.0);
213 
214  globalPos[0] = fPosOut.X();
215  globalPos[1] = fPosOut.Y();
216  globalPos[2] = fPosOut.Z();
217 
218  gMC->Gmtod(globalPos, localPos, 1);
219  fPosOutLocal.SetXYZM(localPos[0], localPos[1], localPos[2], 0.0);
220 
221  // string basename("stt1tube");
222  string basename;
223  TString volumename;
224  string
225  hashmark("#"),
226  volName,
227  fullName,
228  number,
229  specialname,
230  volPath(gMC->CurrentVolPath()),
231  volPath2(gMC->CurrentVolPath());
232 
233  volumename = volPath;
234  volName = GetStringPart(volPath, 2, '/');
235  number = GetStringPart(volName, 1, '_');
236 
237  Int_t start =volPath2.find("fts",0);
238  specialname = volPath2.substr(start,volPath2.find("_",start)-start);
239 
240  if(volumename.Contains("fts01")) basename = "fts01tube";
241  if(volumename.Contains("fts02")) basename = "fts02tube";
242  if(volumename.Contains("fts31")) basename = "fts31tube";
243  if(volumename.Contains("fts32")) basename = "fts32tube";
244  if(volumename.Contains("fts33")) basename = "fts33tube";
245  if(volumename.Contains("fts34")) basename = "fts34tube";
246  if(volumename.Contains("fts35")) basename = "fts35tube";
247  if(volumename.Contains("fts36")) basename = "fts36tube";
248  if(volumename.Contains("fts37")) basename = "fts37tube";
249  if(volumename.Contains("fts38")) basename = "fts38tube";
250  if(volumename.Contains("fts05")) basename = "fts05tube";
251  if(volumename.Contains("fts06")) basename = "fts06tube";
252 
253  fullName = basename + hashmark + number;
254 
255  FairGeoNode
256  *volnode = dynamic_cast<FairGeoNode*> (fPassNodes->FindObject(fullName.c_str()));
257  if (!volnode)
258  {
259  cout << "-I- PndFts: No volume " << fullName.c_str() << " found in geometry container." << endl;
260  return kFALSE;
261  }
262 
263 
264  if(fTrackID!=0){
265  if (fVerboseLevel>2) std::cout<<"befor Mapper------"<<std::endl;
266  }
267 
268  fpostot.SetXYZM((fpostotin.X() + fpostotout.X())/2., (fpostotin.Y() + fpostotout.Y())/2.,(fpostotin.Z() + fpostotout.Z())/2.,0.0);
269 
270 
271  //CHECK map creator-------------------------------------------------
272  //PndFtsMapCreator *mapper = new PndFtsMapCreator(fGeoType);
273  Int_t tubeID=0;
274  //testTubeID=tube number as in the geometry file....
275  //we need to calculate the real number in order to have a different
276  //number for each tube (also for up and down short tubes)
277  Int_t testTubeID = fMapper->GetTubeIDFromPath(gMC->CurrentVolPath());
278  Int_t chamberID=fMapper->GetChamberIDFromPath(gMC->CurrentVolPath());
279  Int_t layerID=fMapper->GetLayerID(chamberID,testTubeID,gMC->CurrentVolPath());
280  //std::cout<<"LAYERID==========="<<layerID<<std::endl;
281  //tubeID=at each tube corresponds only one id number.....
282  tubeID = fMapper->GetTubeIDTot(chamberID,layerID,testTubeID,gMC->CurrentVolPath());
283  //std::cout<<"PndFts.cxx. chamber, tube ID = "<<chamberID<<" "<<tubeID<<" "<<testTubeID<<std::endl;
285 
286 
287  AddHit(fTrackID, fVolumeID, tubeID, chamberID,layerID,
288  TVector3(fpostot.X(), fpostot.Y(), fpostot.Z()),
289  TVector3(fPosInLocal.X(), fPosInLocal.Y(), fPosInLocal.Z()),
290  TVector3(fPosOutLocal.X(), fPosOutLocal.Y(), fPosOutLocal.Z()),
291  TVector3(fMomIn.Px(), fMomIn.Py(), fMomIn.Pz()),
292  TVector3(fMomOut.Px(), fMomOut.Py(), fMomOut.Pz()),
293  fTime, fLength, fELoss, fMass);
294 
295  if (fTrackID !=0){
296  if (fVerboseLevel>2) std::cout<<"AddHit PndFts.cxx= "<<fTrackID<<std::endl;
297  }
298 
299 
300  //Increment number of stt points for TParticle
301  PndStack* stack = (PndStack*) gMC->GetStack();
302  stack->AddPoint(kFTS);
303  ResetParameters();
304 
305 
306 
307  }
308 
309  }
310 
311  return kTRUE;
312 }
Bool_t valid
Definition: PndFts.h:135
TLorentzVector fpostot
Hit collection.
Definition: PndFts.h:129
Int_t fVolumeID
track index
Definition: PndFts.h:113
void ResetParameters()
Definition: PndFts.h:174
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts.h:116
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts.h:117
Int_t GetTubeIDFromPath(TString path)
void AddPoint(DetectorId iDet)
Definition: PndStack.cxx:408
Int_t fTrackID
Definition: PndFts.h:112
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts.h:119
Int_t GetChamberIDFromPath(TString path)
Double_t fELoss
length
Definition: PndFts.h:123
Int_t GetLayerID(Int_t chamberid, Int_t tubeid, TString path)
Double_t
TLorentzVector fpostotin
Definition: PndFts.h:130
TLorentzVector fpostotout
Definition: PndFts.h:131
Int_t GetTubeIDTot(Int_t chamberid, Int_t layerid, Int_t tubeid, TString path)
TObjArray * fPassNodes
Definition: PndFts.h:133
PndFtsMapCreator * fMapper
Definition: PndFts.h:138
TString name
std::string GetStringPart(std::string &aSrc, Int_t part, char aDelim)
Definition: PndFts.cxx:120
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts.h:118
Double_t fLength
time
Definition: PndFts.h:122
Double_t fMass
energy loss
Definition: PndFts.h:124
Double_t fTime
momentum
Definition: PndFts.h:121
PndFtsPoint * AddHit(Int_t trackID, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, TVector3 pos, TVector3 posInLocal, TVector3 posOutLocal, TVector3 momIn, TVector3 momOut, Double_t time, Double_t length, Double_t eLoss, Double_t mass)
Definition: PndFts.cxx:469
TLorentzVector fPos
volume id
Definition: PndFts.h:114
TLorentzVector fMomOut
momentum
Definition: PndFts.h:120
void PndFts::Register ( )
virtual

Virtual method Register

Registers the hit collection in the ROOT manager.

Definition at line 330 of file PndFts.cxx.

References fFtsCollection.

331 {
332  FairRootManager::Instance()->Register("FTSPoint", "Fts", fFtsCollection, kTRUE);
333 }
TClonesArray * fFtsCollection
Definition: PndFts.h:128
void PndFts::Reset ( )
virtual

Virtual method Reset

Clears the hit collection

Definition at line 367 of file PndFts.cxx.

References fFtsCollection, and ResetParameters().

368 {
369  fFtsCollection->Delete();
370  ResetParameters();
371 }
void ResetParameters()
Definition: PndFts.h:174
TClonesArray * fFtsCollection
Definition: PndFts.h:128
void PndFts::ResetParameters ( )
inlineprivate

Private method ResetParameters

Resets the private members for the track parameters

Definition at line 174 of file PndFts.h.

References fELoss, fIsInitialized, fLength, fMass, fMomIn, fMomOut, fPos, fPosIn, fPosIndex, fPosInLocal, fPosOut, fPosOutLocal, fpostot, fpostotin, fpostotout, fTime, fTrackID, fVolumeID, and valid.

Referenced by ProcessHits(), and Reset().

174  {
175  fTrackID = fVolumeID = 0;
176  fPos.SetXYZM(0.0, 0.0, 0.0, 0.0);
177  fPosInLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
178  fPosOutLocal.SetXYZM(0.0, 0.0, 0.0, 0.0);
179  fMomIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
180  fMomOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
181  fTime = fLength = fELoss = 0;
182  fPosIndex = 0;
183  fpostot.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
184  fpostotin.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
185  fpostotout.SetXYZM(0.0, 0.0, 0.0, 0.0); // da cancellare
186  fPosIn.SetXYZM(0.0, 0.0, 0.0, 0.0);
187  fPosOut.SetXYZM(0.0, 0.0, 0.0, 0.0);
188  fMass = 0;
189  fIsInitialized = kFALSE;
190  valid = kFALSE;
191 }
Bool_t valid
Definition: PndFts.h:135
TLorentzVector fpostot
Hit collection.
Definition: PndFts.h:129
Int_t fVolumeID
track index
Definition: PndFts.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts.h:116
Int_t fPosIndex
Definition: PndFts.h:127
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts.h:117
Bool_t fIsInitialized
particle mass
Definition: PndFts.h:125
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts.h:115
Int_t fTrackID
Definition: PndFts.h:112
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts.h:119
Double_t fELoss
length
Definition: PndFts.h:123
TLorentzVector fpostotin
Definition: PndFts.h:130
TLorentzVector fpostotout
Definition: PndFts.h:131
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts.h:118
Double_t fLength
time
Definition: PndFts.h:122
Double_t fMass
energy loss
Definition: PndFts.h:124
Double_t fTime
momentum
Definition: PndFts.h:121
TLorentzVector fPos
volume id
Definition: PndFts.h:114
TLorentzVector fMomOut
momentum
Definition: PndFts.h:120
bool PndFts::Split ( std::string &  aDest,
std::string &  aSrc,
char  aDelim 
)
private

Definition at line 102 of file PndFts.cxx.

References pos.

Referenced by GetStringPart().

103 {
104  if(aSrc.empty())
105  return false;
106 
107  string::size_type
108  pos = aSrc.find(aDelim);
109 
110  aDest = aSrc.substr(0, pos);
111 
112  if(pos != string::npos)
113  aSrc = aSrc.substr(pos + 1);
114  else
115  aSrc = "";
116 
117  return true;
118 }
TVector3 pos

Member Data Documentation

Double_t PndFts::fELoss
private

length

Definition at line 123 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TClonesArray* PndFts::fFtsCollection
private

Definition at line 128 of file PndFts.h.

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

Int_t PndFts::fGeoType
private

Definition at line 136 of file PndFts.h.

Referenced by ConstructGeometry().

Bool_t PndFts::fIsInitialized
private

particle mass

Definition at line 125 of file PndFts.h.

Referenced by ResetParameters().

Double_t PndFts::fLength
private

time

Definition at line 122 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

PndFtsMapCreator* PndFts::fMapper
private

Definition at line 138 of file PndFts.h.

Referenced by ConstructGeometry(), and ProcessHits().

Double_t PndFts::fMass
private

energy loss

Definition at line 124 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fMomIn
private

exit position in straw frame

Definition at line 119 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fMomOut
private

momentum

Definition at line 120 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TObjArray* PndFts::fPassNodes
private

Definition at line 133 of file PndFts.h.

Referenced by ConstructGeometry(), and ProcessHits().

TLorentzVector PndFts::fPos
private

volume id

Definition at line 114 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fPosIn
private

wire position in global frame

Definition at line 115 of file PndFts.h.

Referenced by ResetParameters().

Int_t PndFts::fPosIndex
private

Definition at line 127 of file PndFts.h.

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

TLorentzVector PndFts::fPosInLocal
private

exit position in global frame

Definition at line 117 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fPosOut
private

entry position in global frame

Definition at line 116 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fPosOutLocal
private

entry position in straw frame

Definition at line 118 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fpostot
private

Hit collection.

Definition at line 129 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fpostotin
private

Definition at line 130 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts::fpostotout
private

Definition at line 131 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

Double_t PndFts::fTime
private

momentum

Definition at line 121 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndFts::fTrackID
private

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

Definition at line 112 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndFts::fVolumeID
private

track index

Definition at line 113 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().

Bool_t PndFts::valid
private

Definition at line 135 of file PndFts.h.

Referenced by ProcessHits(), and ResetParameters().


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