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

#include <PndFts2.h>

Inheritance diagram for PndFts2:

Public Member Functions

 PndFts2 ()
 
 PndFts2 (const char *name, Bool_t active)
 
virtual ~PndFts2 ()
 
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 ()
 
 PndFts2 (const PndFts2 &L)
 
PndFts2operator= (const PndFts2 &)
 

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
 

Detailed Description

Definition at line 24 of file PndFts2.h.

Constructor & Destructor Documentation

PndFts2::PndFts2 ( )

Default constructor

Definition at line 43 of file PndFts2.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(new TObjArray()), valid(kFALSE), fGeoType(0)
47 {
48  fFtsCollection = new TClonesArray("PndFtsPoint");
49  fVerboseLevel = 0;
50 }
Bool_t fIsInitialized
particle mass
Definition: PndFts2.h:124
TLorentzVector fMomOut
momentum
Definition: PndFts2.h:119
Double_t fTime
momentum
Definition: PndFts2.h:120
Bool_t valid
Definition: PndFts2.h:134
TLorentzVector fpostot
Hit collection.
Definition: PndFts2.h:128
TObjArray * fPassNodes
Definition: PndFts2.h:132
Double_t fMass
energy loss
Definition: PndFts2.h:123
TLorentzVector fpostotout
Definition: PndFts2.h:130
Double_t fLength
time
Definition: PndFts2.h:121
Double_t fELoss
length
Definition: PndFts2.h:122
Int_t fPosIndex
Definition: PndFts2.h:126
TClonesArray * fFtsCollection
Definition: PndFts2.h:127
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts2.h:114
TLorentzVector fpostotin
Definition: PndFts2.h:129
Int_t fTrackID
Definition: PndFts2.h:111
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts2.h:117
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts2.h:116
TLorentzVector fPos
volume id
Definition: PndFts2.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts2.h:115
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts2.h:118
Int_t fGeoType
Definition: PndFts2.h:135
Int_t fVolumeID
track index
Definition: PndFts2.h:112
PndFts2::PndFts2 ( const char *  name,
Bool_t  active 
)

Standard constructor.

Parameters
namedetetcor name
activesensitivity flag

Definition at line 56 of file PndFts2.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(new TObjArray()), valid(kFALSE), fGeoType(0)
60 {
61  fFtsCollection = new TClonesArray("PndFtsPoint");
62  fVerboseLevel = 0;
63 }
Bool_t fIsInitialized
particle mass
Definition: PndFts2.h:124
TLorentzVector fMomOut
momentum
Definition: PndFts2.h:119
Double_t fTime
momentum
Definition: PndFts2.h:120
Bool_t valid
Definition: PndFts2.h:134
TLorentzVector fpostot
Hit collection.
Definition: PndFts2.h:128
TObjArray * fPassNodes
Definition: PndFts2.h:132
Double_t fMass
energy loss
Definition: PndFts2.h:123
TLorentzVector fpostotout
Definition: PndFts2.h:130
Double_t fLength
time
Definition: PndFts2.h:121
Double_t fELoss
length
Definition: PndFts2.h:122
Int_t fPosIndex
Definition: PndFts2.h:126
TClonesArray * fFtsCollection
Definition: PndFts2.h:127
TLorentzVector fPosIn
wire position in global frame
Definition: PndFts2.h:114
TLorentzVector fpostotin
Definition: PndFts2.h:129
TString name
Int_t fTrackID
Definition: PndFts2.h:111
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts2.h:117
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts2.h:116
TLorentzVector fPos
volume id
Definition: PndFts2.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts2.h:115
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts2.h:118
Int_t fGeoType
Definition: PndFts2.h:135
Int_t fVolumeID
track index
Definition: PndFts2.h:112
PndFts2::~PndFts2 ( )
virtual

Destructor

Definition at line 70 of file PndFts2.cxx.

References fFtsCollection.

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

Member Function Documentation

PndFtsPoint * PndFts2::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 468 of file PndFts2.cxx.

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

Referenced by ProcessHits().

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

Virtual method Construct geometry

Constructs the STT geometry

Definition at line 414 of file PndFts2.cxx.

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

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

References fPosIndex, i, and offset().

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

References fFtsCollection, fPosIndex, and Print().

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

Accessor to the hit collection

Definition at line 340 of file PndFts2.cxx.

References fFtsCollection.

341 {
342  if (iColl == 0)
343  return fFtsCollection;
344  else
345  return NULL;
346 }
TClonesArray * fFtsCollection
Definition: PndFts2.h:127
float PndFts2::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 PndFts2.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 PndFts2::GetStringPart ( std::string &  aSrc,
Int_t  part,
char  aDelim 
)
private

Definition at line 120 of file PndFts2.cxx.

References counter, and Split().

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: PndFts2.cxx:102
int counter
Definition: ZeeAnalysis.C:59
void PndFts2::Initialize ( )

Definition at line 405 of file PndFts2.cxx.

References Initialize().

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

Definition at line 166 of file PndFts2.h.

166 {return *this;}
void PndFts2::Print ( ) const
virtual

Virtual method Print

Screen output of hit collection.

Definition at line 352 of file PndFts2.cxx.

References fFtsCollection, i, and nHits.

Referenced by EndOfEvent().

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

References AddHit(), PndStack::AddPoint(), Double_t, fELoss, fLength, fMass, fMomIn, fMomOut, fPos, fPosInLocal, fPosOut, fPosOutLocal, fpostot, fpostotin, fpostotout, fTime, fTrackID, fVolumeID, 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 = mapper->GetTubeIDFromPath(gMC->CurrentVolPath());
278  Int_t chamberID=mapper->GetChamberIDFromPath(gMC->CurrentVolPath());
279  Int_t layerID=mapper->GetLayerID(chamberID,testTubeID,gMC->CurrentVolPath());
280  //std::cout<<"LAYERID==========="<<layerID<<std::endl;
281  //tubeID=at each tube corresponds only one id number.....
282  tubeID = mapper->GetTubeIDTot(chamberID,layerID,testTubeID,gMC->CurrentVolPath());
283  //std::cout<<"PndFts.cxx. chamber, tube ID = "<<chamberID<<" "<<tubeID<<" "<<testTubeID<<std::endl;
285 */
286 fpostot.SetXYZM((fpostotin.X() + fpostotout.X())/2., (fpostotin.Y() + fpostotout.Y())/2.,(fpostotin.Z() + fpostotout.Z())/2.,0.0);
287  Int_t tubeID = 0, chamberID = 0, layerID = 0;
288  AddHit(fTrackID, fVolumeID, tubeID, chamberID,layerID,
289  TVector3(fpostot.X(), fpostot.Y(), fpostot.Z()),
290  TVector3(fPosInLocal.X(), fPosInLocal.Y(), fPosInLocal.Z()),
291  TVector3(fPosOutLocal.X(), fPosOutLocal.Y(), fPosOutLocal.Z()),
292  TVector3(fMomIn.Px(), fMomIn.Py(), fMomIn.Pz()),
293  TVector3(fMomOut.Px(), fMomOut.Py(), fMomOut.Pz()),
294  fTime, fLength, fELoss, fMass);
295 
296  if (fTrackID !=0){
297  if (fVerboseLevel>2) std::cout<<"AddHit PndFts.cxx= "<<fTrackID<<std::endl;
298  }
299 
300 
301  //Increment number of stt points for TParticle
302  PndStack* stack = (PndStack*) gMC->GetStack();
303  stack->AddPoint(kFTS);
304  ResetParameters();
305 
306 
307 
308  }
309 
310  }
311 
312  return kTRUE;
313 }
TLorentzVector fMomOut
momentum
Definition: PndFts2.h:119
Double_t fTime
momentum
Definition: PndFts2.h:120
Bool_t valid
Definition: PndFts2.h:134
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: PndFts2.cxx:468
TLorentzVector fpostot
Hit collection.
Definition: PndFts2.h:128
Double_t fMass
energy loss
Definition: PndFts2.h:123
TLorentzVector fpostotout
Definition: PndFts2.h:130
void AddPoint(DetectorId iDet)
Definition: PndStack.cxx:408
Double_t fLength
time
Definition: PndFts2.h:121
Double_t fELoss
length
Definition: PndFts2.h:122
Double_t
TLorentzVector fpostotin
Definition: PndFts2.h:129
void ResetParameters()
Definition: PndFts2.h:173
TString name
Int_t fTrackID
Definition: PndFts2.h:111
TLorentzVector fPosOutLocal
entry position in straw frame
Definition: PndFts2.h:117
TLorentzVector fPosInLocal
exit position in global frame
Definition: PndFts2.h:116
TLorentzVector fPos
volume id
Definition: PndFts2.h:113
TLorentzVector fPosOut
entry position in global frame
Definition: PndFts2.h:115
TLorentzVector fMomIn
exit position in straw frame
Definition: PndFts2.h:118
Int_t fVolumeID
track index
Definition: PndFts2.h:112
void PndFts2::Register ( )
virtual

Virtual method Register

Registers the hit collection in the ROOT manager.

Definition at line 331 of file PndFts2.cxx.

References fFtsCollection.

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

Virtual method Reset

Clears the hit collection

Definition at line 368 of file PndFts2.cxx.

References fFtsCollection, and ResetParameters().

369 {
370  fFtsCollection->Delete();
371  ResetParameters();
372 }
TClonesArray * fFtsCollection
Definition: PndFts2.h:127
void ResetParameters()
Definition: PndFts2.h:173
void PndFts2::ResetParameters ( )
inlineprivate

Private method ResetParameters

Resets the private members for the track parameters

Definition at line 173 of file PndFts2.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().

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

Definition at line 102 of file PndFts2.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 PndFts2::fELoss
private

length

Definition at line 122 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TClonesArray* PndFts2::fFtsCollection
private

Definition at line 127 of file PndFts2.h.

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

Int_t PndFts2::fGeoType
private

Definition at line 135 of file PndFts2.h.

Referenced by ConstructGeometry().

Bool_t PndFts2::fIsInitialized
private

particle mass

Definition at line 124 of file PndFts2.h.

Referenced by ResetParameters().

Double_t PndFts2::fLength
private

time

Definition at line 121 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

Double_t PndFts2::fMass
private

energy loss

Definition at line 123 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fMomIn
private

exit position in straw frame

Definition at line 118 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fMomOut
private

momentum

Definition at line 119 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TObjArray* PndFts2::fPassNodes
private

Definition at line 132 of file PndFts2.h.

Referenced by ConstructGeometry().

TLorentzVector PndFts2::fPos
private

volume id

Definition at line 113 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fPosIn
private

wire position in global frame

Definition at line 114 of file PndFts2.h.

Referenced by ResetParameters().

Int_t PndFts2::fPosIndex
private

Definition at line 126 of file PndFts2.h.

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

TLorentzVector PndFts2::fPosInLocal
private

exit position in global frame

Definition at line 116 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fPosOut
private

entry position in global frame

Definition at line 115 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fPosOutLocal
private

entry position in straw frame

Definition at line 117 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fpostot
private

Hit collection.

Definition at line 128 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fpostotin
private

Definition at line 129 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

TLorentzVector PndFts2::fpostotout
private

Definition at line 130 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

Double_t PndFts2::fTime
private

momentum

Definition at line 120 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndFts2::fTrackID
private

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

Definition at line 111 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

Int_t PndFts2::fVolumeID
private

track index

Definition at line 112 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().

Bool_t PndFts2::valid
private

Definition at line 134 of file PndFts2.h.

Referenced by ProcessHits(), and ResetParameters().


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