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

#include <PndSttCellTrackFinderData.h>

Public Member Functions

 PndSttCellTrackFinderData (TClonesArray *fTubeArray)
 
virtual ~PndSttCellTrackFinderData ()
 
void AddHits (TClonesArray *hits, TString branchName)
 
void GenerateNeighborhoodData ()
 
void clear ()
 
void PrintInfo ()
 
void SetAllowDoubleHits (Bool_t value)
 
Bool_t GetAllowDoubleHits ()
 
std::vector< FairHit * > GetHits () const
 
std::multimap< int,
PndSttSkewedHit * > 
GetCombinedSkewedHits () const
 
PndSttStrawMapGetStrawMap () const
 
PndSttGeometryMapGetGeometryMap () const
 
std::map< int, FairLink > GetMapHitToFairLink () const
 
std::map< int, int > GetMapTubeIdToHit () const
 
std::map< int, TVector3 > GetMapTubeIdToPos () const
 
std::map< int, std::vector< int > > GetHitNeighbors () const
 
std::map< int, std::vector< int > > GetSeparations () const
 
std::map< int, std::vector< int > > GetHitNeighborsWithoutEdges () const
 
std::map< int, std::vector< int > > GetSeparationsWithoutEdges () const
 
std::map< int, std::vector< int > > GetHitNeighborsWithoutSkewed () const
 
std::map< int, std::vector< int > > GetSeparationsWithoutSkewed () const
 
int GetNumHits ()
 
int GetNumHitsWithoutDouble ()
 
void SetRunTimeBased (Bool_t val)
 
void SetClusterTime (double val)
 

Private Member Functions

void SeparateNeighbors ()
 
void FindHitNeighborsEventBased ()
 
void FindHitNeighborsTimeBased ()
 

Private Attributes

std::map< int, FairLink > fMapHitToFairLink
 
std::map< int, FairLink > fMapHitToFairLinkOrig
 
std::vector< FairHit * > fHits
 
std::vector< FairHit * > fHitsOrig
 
std::multimap< int,
PndSttSkewedHit * > 
fCombinedSkewedHits
 
double fClusterTime
 
Bool_t fAllowDoubleHits
 
int fNumHits
 
int fNumHitsWithoutDouble
 
Bool_t fRunTimeBased
 
PndSttStrawMapfStrawMap
 
PndSttGeometryMapfGeometryMap
 
std::map< int, TVector3 > fMapTubeIdToPos
 
std::map< int, int > fMapTubeIdToHit
 
std::map< int, std::vector< int > > fHitNeighbors
 
std::map< int, std::vector< int > > fSeparations
 
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
 
std::map< int, std::vector< int > > fSeparationsWithoutEdges
 
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
 
std::map< int, std::vector< int > > fSeparationsWithoutSkewed
 

Detailed Description

Definition at line 22 of file PndSttCellTrackFinderData.h.

Constructor & Destructor Documentation

PndSttCellTrackFinderData::PndSttCellTrackFinderData ( TClonesArray *  fTubeArray)

Definition at line 26 of file PndSttCellTrackFinderData.cxx.

References fGeometryMap, fMapTubeIdToPos, fStrawMap, PndSttGeometryMap::GetNeighboringsByMap(), PndSttTube::GetPosition(), PndSttTube::GetTubeID(), i, PndSttGeometryMap::IsSkewedStraw(), and pos.

28 
29  // Generate information of Straw- and GeometryMap.
30  // It is always the same data for all events.
31 
32  fStrawMap = new PndSttStrawMap(sttTubeArray);
33  fGeometryMap = new PndSttGeometryMap(sttTubeArray, 1);
34 
35  PndSttTube* tube;
36  TVector3 pos;
37 
38 #ifdef PRINT_STT_NEIGHBORS
39  TArrayI neighbors;
40  FILE* fp = fopen("tubeNeighborings.txt", "w");
41  int minNumNeigh=100, maxNumNeigh=0, numSkewed=0, numSkewedLessNeig=0;
42  bool skewed;
43 #endif
44 
45  for (int i = 1; i < sttTubeArray->GetEntriesFast(); ++i) {
46  tube = (PndSttTube*) sttTubeArray->At(i);
47  pos = tube->GetPosition();
49 
50 #ifdef PRINT_STT_NEIGHBORS
51  neighbors=fGeometryMap->GetNeighboringsByMap(tube->GetTubeID());
52  skewed=fGeometryMap->IsSkewedStraw(tube->GetTubeID());
53  if(skewed) ++numSkewed;
54  if(skewed && neighbors.GetSize()<7) ++numSkewedLessNeig;
55  fprintf(fp, "%d %4i:",skewed, tube->GetTubeID());
56  for(int j=0; j<neighbors.GetSize(); ++j) {
57  fprintf(fp, " %4i", neighbors[j]);
58  }
59  fprintf(fp, "\n");
60 
61  if(minNumNeigh>neighbors.GetSize()) minNumNeigh=neighbors.GetSize();
62  if(maxNumNeigh<neighbors.GetSize()) maxNumNeigh=neighbors.GetSize();
63 #endif
64  }
65 
66 #ifdef PRINT_STT_NEIGHBORS
67  fprintf(fp, "max/min number of neighbors: %3i / %3i\n", maxNumNeigh, minNumNeigh);
68  fprintf(fp, "number of skewed straws: %3i \n", numSkewed);
69  fprintf(fp, "number of skewed straws with less than 7 neighbors: %3i \n", numSkewedLessNeig);
70  fclose(fp);
71 #endif
72 
73 }
TVector3 pos
Int_t i
Definition: run_full.C:25
Int_t GetTubeID()
Definition: PndSttTube.cxx:103
TVector3 GetPosition()
Definition: PndSttTube.cxx:87
bool IsSkewedStraw(int strawindex) const
std::map< int, TVector3 > fMapTubeIdToPos
TArrayI GetNeighboringsByMap(int tubeId)
virtual PndSttCellTrackFinderData::~PndSttCellTrackFinderData ( )
inlinevirtual

Definition at line 28 of file PndSttCellTrackFinderData.h.

References fGeometryMap, fHits, fHitsOrig, fStrawMap, and i.

28  {
29  delete fStrawMap;
30  delete fGeometryMap;
31  for (size_t i = 0; i < fHits.size(); ++i)
32  delete fHits.at(i);
33  for (size_t i = 0; i < fHitsOrig.size(); ++i)
34  delete fHitsOrig.at(i);
35 
36  }
Int_t i
Definition: run_full.C:25
std::vector< FairHit * > fHits
std::vector< FairHit * > fHitsOrig

Member Function Documentation

void PndSttCellTrackFinderData::AddHits ( TClonesArray *  hits,
TString  branchName 
)

Definition at line 75 of file PndSttCellTrackFinderData.cxx.

References fCombinedSkewedHits, fHitsOrig, fMapHitToFairLinkOrig, PndSttHit::GetIsochrone(), PndSttSkewedHit::GetTubeIDs(), and i.

75  {
76 
77  PndSttHit* myHit;
78  FairLink myID;
79  Int_t branchId = FairRootManager::Instance()->GetBranchId("STTHit");
80 // only STTHits are passed to this functions, but we have to check if SkewedHits are present.
81 
82  if (branchName.Contains("skewed", TString::kIgnoreCase)){
83  // I'm not sure if this part of the code really does what it should!
84  // since skewed straw tubes are not really used at the moment I can not tell.
85 
86  fCombinedSkewedHits.clear();
87 
88  for (int i = 0; i < hits->GetEntries(); i++) {
89  PndSttSkewedHit* skewedHit = (PndSttSkewedHit*) (hits->At(i));
90  int tubeId = skewedHit->GetTubeIDs().first;
91  fCombinedSkewedHits.insert(
92  std::pair<int, PndSttSkewedHit*>(tubeId, skewedHit));
93  if (skewedHit->GetEntryNr().GetIndex() < 0) {
94  myID = FairLink(branchId, i);
95  skewedHit->SetEntryNr(FairLink(branchId, i));
96  } else
97  myID = skewedHit->GetEntryNr();
98  }
99 
100  }
101  else { //"normal" stt htis are added to the Data map
102 
103  fMapHitToFairLinkOrig.clear();
104  fHitsOrig.clear();
105 
106  for (int i = 0; i < hits->GetEntries(); i++) {
107  myHit = (PndSttHit*) (hits->At(i));
108 
109  if (myHit->GetEntryNr().GetIndex() < 0) {
110  myID = FairLink(branchId, i);
111  myHit->SetEntryNr(FairLink(branchId, i));
112  } else
113  myID = myHit->GetEntryNr();
114  myHit->SetDxyz(myHit->GetIsochrone(), myHit->GetIsochrone(), 100);
115  fMapHitToFairLinkOrig[i] = myID;
116  fHitsOrig.push_back((FairHit*) myHit);
117  }
118  }
119 
120 }
Int_t i
Definition: run_full.C:25
Double_t GetIsochrone() const
Definition: PndSttHit.h:62
std::multimap< int, PndSttSkewedHit * > fCombinedSkewedHits
std::vector< FairHit * > fHitsOrig
CbmHit * hits[nHits]
Definition: RiemannTest.C:19
std::map< int, FairLink > fMapHitToFairLinkOrig
std::pair< Int_t, Int_t > GetTubeIDs() const
void PndSttCellTrackFinderData::clear ( void  )
inline

Definition at line 43 of file PndSttCellTrackFinderData.h.

References fCombinedSkewedHits, fHitNeighbors, fHitNeighborsWithoutEdges, fHitNeighborsWithoutSkewed, fHits, fHitsOrig, fMapHitToFairLink, fMapTubeIdToHit, fSeparations, fSeparationsWithoutEdges, and fSeparationsWithoutSkewed.

Referenced by PndSttCellTrackFinder::Reset().

43  {
44  fHits.clear();
45  fHitsOrig.clear();
46  fMapHitToFairLink.clear();
47  fMapTubeIdToHit.clear();
48  fHitNeighbors.clear();
49  fSeparations.clear();
50  fCombinedSkewedHits.clear();
55  }
std::map< int, std::vector< int > > fHitNeighbors
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
std::vector< FairHit * > fHits
std::map< int, FairLink > fMapHitToFairLink
std::map< int, std::vector< int > > fSeparationsWithoutEdges
std::multimap< int, PndSttSkewedHit * > fCombinedSkewedHits
std::vector< FairHit * > fHitsOrig
std::map< int, std::vector< int > > fSeparations
std::map< int, std::vector< int > > fSeparationsWithoutSkewed
void PndSttCellTrackFinderData::FindHitNeighborsEventBased ( )
private

Definition at line 169 of file PndSttCellTrackFinderData.cxx.

References fGeometryMap, fHitNeighbors, fHitNeighborsWithoutEdges, fHitNeighborsWithoutSkewed, fHits, fStrawMap, PndSttGeometryMap::GetNeighboringsByMap(), PndSttHit::GetTubeID(), i, PndSttStrawMap::IsEdgeStraw(), and PndSttStrawMap::IsSkewedStraw().

Referenced by GenerateNeighborhoodData().

169  { // if not def RunTimeBased
170 
171  /* Approach: At first create a set of the tubeIDs of all hits.
172  * Then get the neighbors of each hit/tube and store only those
173  * that are included in the set.*/
174 
175  PndSttHit* sttHit;
176  int tubeId;
177  set<int> hitIds;
178 
179  //initialize set with straw-ids of hits
180  for (size_t i = 0; i < fHits.size(); ++i) {
181  sttHit = (PndSttHit*) fHits[i];
182  hitIds.insert(sttHit->GetTubeID());
183  }
184 
185  //fill fHitNeighbors
186  for (size_t i = 0; i < fHits.size(); ++i) {
187  sttHit = (PndSttHit*) fHits[i];
188  tubeId = sttHit->GetTubeID();
189  //get neighbors
190  TArrayI neighbors = fGeometryMap->GetNeighboringsByMap(tubeId);
191 
192  for (int j = 0; j < neighbors.GetSize(); ++j) {
193 
194  //set contains neighbor?
195  if (hitIds.find(neighbors[j]) != hitIds.end()) {
196 
197  //add to map with all neighbors
198  fHitNeighbors[tubeId].push_back(neighbors[j]);
199 
200  //actual tube and neighbor are not both on the edge of the stt?
201  if (!(fStrawMap->IsEdgeStraw(tubeId)
202  && fStrawMap->IsEdgeStraw(neighbors[j]))) {
203 
204  //add to the other map
205  fHitNeighborsWithoutEdges[tubeId].push_back(neighbors[j]);
206  }
207  }
208  }
209 
210  if (fHitNeighbors.find(tubeId) == fHitNeighbors.end()) {
211  //no hitNeighbor was found
212  vector<int> tmp;
213  fHitNeighbors[tubeId] = tmp;
214  }
215 
216  if (fHitNeighborsWithoutEdges.find(tubeId)
217  == fHitNeighborsWithoutEdges.end()) {
218  //no hitNeighbor was found
219  vector<int> tmp;
220  fHitNeighborsWithoutEdges[tubeId] = tmp;
221  }
222 
223  if (!fStrawMap->IsSkewedStraw(tubeId)) {
224  for (int j = 0; j < neighbors.GetSize(); ++j) {
225  if (hitIds.find(neighbors[j]) != hitIds.end()
226  && !fStrawMap->IsSkewedStraw(neighbors[j])) {
227  fHitNeighborsWithoutSkewed[tubeId].push_back(neighbors[j]);
228  }
229  }
230  }
231  }
232 }
std::map< int, std::vector< int > > fHitNeighbors
Int_t i
Definition: run_full.C:25
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
std::vector< FairHit * > fHits
bool IsSkewedStraw(int strawindex) const
Int_t GetTubeID() const
Definition: PndSttHit.h:75
bool IsEdgeStraw(int strawindex) const
TArrayI GetNeighboringsByMap(int tubeId)
void PndSttCellTrackFinderData::FindHitNeighborsTimeBased ( )
private

Definition at line 234 of file PndSttCellTrackFinderData.cxx.

References fClusterTime, fGeometryMap, fHitNeighbors, fHitNeighborsWithoutEdges, fHitNeighborsWithoutSkewed, fHits, fMapTubeIdToHit, fStrawMap, PndSttGeometryMap::GetNeighboringsByMap(), PndSttHit::GetTubeID(), i, PndSttStrawMap::IsEdgeStraw(), and PndSttStrawMap::IsSkewedStraw().

Referenced by GenerateNeighborhoodData().

234  { // if def RunTimeBased
235 
236  /* J.R. Adopted from PndSttCellTrackFinderData::FindHitNeighborsEventBased
237  * Added conditions to check timestamps and perform
238  * time clustering. 28/03-2018*/
239 
240  PndSttHit* sttHit;
241  int tubeId;
242  set<int> hitIds;
243 
244  // Time difference chosen since drift time of electrons is 200 ns so signals in neighboring subes can have tis delay
245  double sttHitTimeStamp; // J.R. 28/03-2018 // Timestamp of stt hit for time clustering
246  double sttNeighborTimeStamp; // J.R. 28/03-2018 // Timestamp of neighbor for time clustering
247 
248  //initialize set with straw-ids of hits
249  for (size_t i = 0; i < fHits.size(); ++i) {
250  sttHit = (PndSttHit*) fHits[i];
251 
252  hitIds.insert(sttHit->GetTubeID());
253  }
254 
255  //fill fHitNeighbors
256  for (size_t i = 0; i < fHits.size(); ++i) {
257 
258  sttHit = (PndSttHit*) fHits[i];
259  tubeId = sttHit->GetTubeID();
260 
261  //sttHitTimestamp=9999;
262  sttHitTimeStamp=sttHit->GetTimeStamp(); // JR 28/03-2018 // Timestamp for time clustering
263  sttNeighborTimeStamp=-9999; // JR 23/04-2018 // Timestamp for time clustering
264  //get neighbors
265  TArrayI neighbors = fGeometryMap->GetNeighboringsByMap(tubeId);
266 
267  for (int j = 0; j < neighbors.GetSize(); ++j) {
268 
269  //set contains neighbor?
270  if (hitIds.find(neighbors[j]) != hitIds.end()) {
271 
272  sttHit = (PndSttHit*) fHits[fMapTubeIdToHit[neighbors.At(j)]]; // J.R. 28/03-2018 // Get neighboring STT hit
273  sttNeighborTimeStamp = sttHit->GetTimeStamp();
274 
275  if(std::abs(sttHitTimeStamp - sttNeighborTimeStamp) < fClusterTime){ // J.R. 28/03-2018 // check difference in timestam [ns]
276 
277  fHitNeighbors[tubeId].push_back(neighbors.At(j)); // J.R. 28/03-2018 // add neighbor separately to set, not entire set of neighbors as obtained by SttGeometryMap
278  } // J.R. Difference timestamp end
279 
280  //actual tube and neighbor are not both on the edge of the stt?
281  if (!(fStrawMap->IsEdgeStraw(tubeId)
282  && fStrawMap->IsEdgeStraw(neighbors[j]))) {
283  if(std::abs(sttHitTimeStamp - sttNeighborTimeStamp) < fClusterTime){ // J.R. 28/03-2018 // check difference in timestam [ns]
284  //add to the other map
285  fHitNeighborsWithoutEdges[tubeId].push_back(neighbors.At(j));
286  } // J.R. Difference timestamp end
287  }
288  }
289  }
290 
291  if (fHitNeighbors.find(tubeId) == fHitNeighbors.end()) {
292  //no hitNeighbor was found
293  vector<int> tmp;
294  fHitNeighbors[tubeId] = tmp;
295  }
296 
297  if (fHitNeighborsWithoutEdges.find(tubeId)
298  == fHitNeighborsWithoutEdges.end()) {
299  //no hitNeighbor was found
300  vector<int> tmp;
301  fHitNeighborsWithoutEdges[tubeId] = tmp;
302  }
303 
304  if (!fStrawMap->IsSkewedStraw(tubeId)) {
305  for (int j = 0; j < neighbors.GetSize(); ++j) {
306  if (hitIds.find(neighbors[j]) != hitIds.end()
307  && !fStrawMap->IsSkewedStraw(neighbors[j])) {
308  // J.R. get neighbors to check timestamps
309 
310  sttHit = (PndSttHit*) fHits[fMapTubeIdToHit[neighbors.At(j)]]; // J.R. 28/03-2018 // Get neighboring STT hit
311  sttNeighborTimeStamp = sttHit->GetTimeStamp();
312 
313  if(std::abs(sttHitTimeStamp - sttNeighborTimeStamp) < fClusterTime){ // J.R. 28/03-2018 // check difference in timestam [ns]
314 
315  fHitNeighborsWithoutSkewed[tubeId].push_back(neighbors.At(j));
316  } // J.R. Difference timestamp end
317  }
318  }
319  }
320  }
321 }
std::map< int, std::vector< int > > fHitNeighbors
Int_t i
Definition: run_full.C:25
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
std::vector< FairHit * > fHits
bool IsSkewedStraw(int strawindex) const
Int_t GetTubeID() const
Definition: PndSttHit.h:75
bool IsEdgeStraw(int strawindex) const
TArrayI GetNeighboringsByMap(int tubeId)
void PndSttCellTrackFinderData::GenerateNeighborhoodData ( )

Definition at line 122 of file PndSttCellTrackFinderData.cxx.

References fAllowDoubleHits, fHits, fHitsOrig, FindHitNeighborsEventBased(), FindHitNeighborsTimeBased(), fMapHitToFairLink, fMapHitToFairLinkOrig, fMapTubeIdToHit, fNumHits, fNumHitsWithoutDouble, fRunTimeBased, PndSttHit::GetTubeID(), i, and SeparateNeighbors().

122  {
123 
124  //fill set with tubeIDs to remove double hits
125  int tubeId;
126  set<int> sttHits;
127  vector<FairHit*> hitsWithoutDouble;
128  map<int, FairLink> mapWithoutDouble;
129  int hitIndex=0;
130 
131  for(size_t i=0; i<fHitsOrig.size(); ++i){
132  tubeId=((PndSttHit*) fHitsOrig[i])->GetTubeID();
133  if(sttHits.find(tubeId)==sttHits.end()){
134  sttHits.insert(tubeId);
135  hitsWithoutDouble.push_back(fHitsOrig[i]);
136  mapWithoutDouble[hitIndex]=fMapHitToFairLinkOrig[i];
137  ++hitIndex;
138  }
139  }
140 
141  fNumHits=fHitsOrig.size();
142  fNumHitsWithoutDouble=sttHits.size();
143 
144  if (!fAllowDoubleHits) {
145  fHits = hitsWithoutDouble;
146  fMapHitToFairLink=mapWithoutDouble;
147 
148  } else {
149  fHits = fHitsOrig;
151  }
152 
153  PndSttHit* sttHit;
154  for (size_t i = 0; i < fHits.size(); ++i) {
155  sttHit = (PndSttHit*) fHits[i];
156 
157  fMapTubeIdToHit[sttHit->GetTubeID()] = i;
158  }
159 
160  if(fRunTimeBased == kFALSE) {
162  } else {
164  }
165 
167 }
Int_t i
Definition: run_full.C:25
std::vector< FairHit * > fHits
std::map< int, FairLink > fMapHitToFairLink
Int_t GetTubeID() const
Definition: PndSttHit.h:75
std::vector< FairHit * > fHitsOrig
std::map< int, FairLink > fMapHitToFairLinkOrig
Bool_t PndSttCellTrackFinderData::GetAllowDoubleHits ( )
inline

Definition at line 63 of file PndSttCellTrackFinderData.h.

References fAllowDoubleHits.

63  {
64  return fAllowDoubleHits;
65  }
std::multimap<int, PndSttSkewedHit*> PndSttCellTrackFinderData::GetCombinedSkewedHits ( ) const
inline

Definition at line 71 of file PndSttCellTrackFinderData.h.

References fCombinedSkewedHits.

71  {
72  return fCombinedSkewedHits;
73  }
std::multimap< int, PndSttSkewedHit * > fCombinedSkewedHits
PndSttGeometryMap* PndSttCellTrackFinderData::GetGeometryMap ( ) const
inline

Definition at line 79 of file PndSttCellTrackFinderData.h.

References fGeometryMap.

Referenced by PndSttCellTrackFinderTask::Init().

79  {
80  return fGeometryMap;
81  }
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetHitNeighbors ( ) const
inline

Definition at line 95 of file PndSttCellTrackFinderData.h.

References fHitNeighbors.

95  {
96  return fHitNeighbors;
97  }
std::map< int, std::vector< int > > fHitNeighbors
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetHitNeighborsWithoutEdges ( ) const
inline

Definition at line 103 of file PndSttCellTrackFinderData.h.

References fHitNeighborsWithoutEdges.

103  {
105  }
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetHitNeighborsWithoutSkewed ( ) const
inline

Definition at line 111 of file PndSttCellTrackFinderData.h.

References fHitNeighborsWithoutSkewed.

111  {
113  }
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
std::vector<FairHit*> PndSttCellTrackFinderData::GetHits ( ) const
inline

Definition at line 67 of file PndSttCellTrackFinderData.h.

References fHits.

67  {
68  return fHits;
69  }
std::vector< FairHit * > fHits
std::map<int,FairLink> PndSttCellTrackFinderData::GetMapHitToFairLink ( ) const
inline

Definition at line 83 of file PndSttCellTrackFinderData.h.

References fMapHitToFairLink.

83  {
84  return fMapHitToFairLink;
85  }
std::map< int, FairLink > fMapHitToFairLink
std::map<int, int> PndSttCellTrackFinderData::GetMapTubeIdToHit ( ) const
inline

Definition at line 87 of file PndSttCellTrackFinderData.h.

References fMapTubeIdToHit.

87  {
88  return fMapTubeIdToHit;
89  }
std::map<int, TVector3> PndSttCellTrackFinderData::GetMapTubeIdToPos ( ) const
inline

Definition at line 91 of file PndSttCellTrackFinderData.h.

References fMapTubeIdToPos.

91  {
92  return fMapTubeIdToPos;
93  }
std::map< int, TVector3 > fMapTubeIdToPos
int PndSttCellTrackFinderData::GetNumHits ( )
inline

Definition at line 119 of file PndSttCellTrackFinderData.h.

References fNumHits.

Referenced by PndSttCellTrackFinder::NumHits().

119  {
120  return fNumHits;
121  }
int PndSttCellTrackFinderData::GetNumHitsWithoutDouble ( )
inline
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetSeparations ( ) const
inline

Definition at line 99 of file PndSttCellTrackFinderData.h.

References fSeparations.

Referenced by PndSttCellTrackFinder::NumUnambiguousNeighbors().

99  {
100  return fSeparations;
101  }
std::map< int, std::vector< int > > fSeparations
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetSeparationsWithoutEdges ( ) const
inline

Definition at line 107 of file PndSttCellTrackFinderData.h.

References fSeparationsWithoutEdges.

107  {
109  }
std::map< int, std::vector< int > > fSeparationsWithoutEdges
std::map<int, std::vector<int> > PndSttCellTrackFinderData::GetSeparationsWithoutSkewed ( ) const
inline

Definition at line 115 of file PndSttCellTrackFinderData.h.

References fSeparationsWithoutSkewed.

115  {
117  }
std::map< int, std::vector< int > > fSeparationsWithoutSkewed
PndSttStrawMap* PndSttCellTrackFinderData::GetStrawMap ( ) const
inline

Definition at line 75 of file PndSttCellTrackFinderData.h.

References fStrawMap.

75  {
76  return fStrawMap;
77  }
void PndSttCellTrackFinderData::PrintInfo ( )

Definition at line 370 of file PndSttCellTrackFinderData.cxx.

References fHitNeighbors, fHits, fSeparations, fStrawMap, i, PndSttStrawMap::IsSkewedStraw(), and map.

370  {
371  cout << "PndSttCellTrackFinderData::PrintInfo()" << endl;
372  cout << "#hits: " << fHits.size() << ", #unambiguous: "
373  << fSeparations[0].size() + fSeparations[1].size()
374  + fSeparations[2].size() << ", #ambiguous: "
375  << fSeparations[3].size() + fSeparations[4].size()
376  + fSeparations[5].size() + fSeparations[6].size()
377  + fSeparations[7].size() << endl;
378 
379  cout << "fHits (*-skewed): ";
380  int tubeID;
381  for (size_t i = 0; i < fHits.size(); ++i) {
382  tubeID = ((PndSttHit*) fHits.at(i))->GetTubeID();
383  cout << tubeID;
384  if (fStrawMap->IsSkewedStraw(tubeID))
385  cout << "*";
386  cout << ", ";
387  }
388  cout << endl;
389 
390  cout << "fSeparations: " << endl;
391  for (int i = 0; i < 8; ++i) {
392  cout << "#" << i << ": ";
393  for (size_t j = 0; j < fSeparations[i].size(); ++j) {
394  cout << fSeparations[i].at(j);
395  if (fStrawMap->IsSkewedStraw(tubeID))
396  cout << "*";
397  cout << ", ";
398  }
399  cout << endl;
400  }
401 
402  cout << "fHitNeighbors: " << endl;
403  for (map<int, vector<int> >::iterator it = fHitNeighbors.begin();
404  it != fHitNeighbors.end(); ++it) {
405  cout << it->first << ": ";
406  for (size_t i = 0; i < it->second.size(); ++i) {
407  cout << it->second.at(i) << " ";
408  }
409  cout << endl;
410  }
411 }
std::map< int, std::vector< int > > fHitNeighbors
Int_t i
Definition: run_full.C:25
PndTransMap * map
Definition: sim_emc_apd.C:99
std::vector< FairHit * > fHits
bool IsSkewedStraw(int strawindex) const
std::map< int, std::vector< int > > fSeparations
void PndSttCellTrackFinderData::SeparateNeighbors ( )
private

Definition at line 323 of file PndSttCellTrackFinderData.cxx.

References fHitNeighbors, fHitNeighborsWithoutEdges, fHitNeighborsWithoutSkewed, fSeparations, fSeparationsWithoutEdges, fSeparationsWithoutSkewed, and i.

Referenced by GenerateNeighborhoodData().

323  {
324 
325  /* Separate the hits/active cells concerning the number of neighbors that made a signal, too.*/
326 
327  map<int, vector<int> >::iterator it;
328 
329  for (int i = 0; i < 8; ++i) {
330  fSeparations[i].clear();
331  fSeparationsWithoutEdges[i].clear();
332  }
333 
334  for (it = fHitNeighbors.begin(); it != fHitNeighbors.end(); ++it) {
335 
336  if (it->second.size() > 6) {
337  // store cells with more than 6 neighbors in the same entry
338  fSeparations[7].push_back(it->first);
339  } else {
340  // separation concerning 0-6 hit-neighbors
341  fSeparations[it->second.size()].push_back(it->first);
342  }
343  }
344 
345  for (it = fHitNeighborsWithoutEdges.begin();
346  it != fHitNeighborsWithoutEdges.end(); ++it) {
347 
348  if (it->second.size() > 6) {
349  // store cells with more than 6 neighbors in the same entry
350  fSeparationsWithoutEdges[7].push_back(it->first);
351  } else {
352  // separation concerning 0-6 hit-neighbors
353  fSeparationsWithoutEdges[it->second.size()].push_back(it->first);
354  }
355  }
356 
357  for (it = fHitNeighborsWithoutSkewed.begin();
358  it != fHitNeighborsWithoutSkewed.end(); ++it) {
359 
360  if (it->second.size() > 6) {
361  // store cells with more than 6 neighbors in the same entry
362  fSeparationsWithoutSkewed[7].push_back(it->first);
363  } else {
364  // separation concerning 0-6 hit-neighbors
365  fSeparationsWithoutSkewed[it->second.size()].push_back(it->first);
366  }
367  }
368 }
std::map< int, std::vector< int > > fHitNeighbors
Int_t i
Definition: run_full.C:25
std::map< int, std::vector< int > > fHitNeighborsWithoutSkewed
std::map< int, std::vector< int > > fHitNeighborsWithoutEdges
std::map< int, std::vector< int > > fSeparationsWithoutEdges
std::map< int, std::vector< int > > fSeparations
std::map< int, std::vector< int > > fSeparationsWithoutSkewed
void PndSttCellTrackFinderData::SetAllowDoubleHits ( Bool_t  value)
inline

Definition at line 59 of file PndSttCellTrackFinderData.h.

References fAllowDoubleHits.

59  {
60  fAllowDoubleHits=value;
61  }
void PndSttCellTrackFinderData::SetClusterTime ( double  val)
inline

Definition at line 129 of file PndSttCellTrackFinderData.h.

References fClusterTime, and val.

129  {
130  fClusterTime = val;
131  }; // J.R. 20/04-2018
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11
void PndSttCellTrackFinderData::SetRunTimeBased ( Bool_t  val)
inline

Definition at line 126 of file PndSttCellTrackFinderData.h.

References fRunTimeBased, and val.

126  {
127  fRunTimeBased = val;
128  }; // J.R. 26/04-2018
Double_t val[nBoxes][nFEBox]
Definition: createCalib.C:11

Member Data Documentation

Bool_t PndSttCellTrackFinderData::fAllowDoubleHits
private
double PndSttCellTrackFinderData::fClusterTime
private

Definition at line 141 of file PndSttCellTrackFinderData.h.

Referenced by FindHitNeighborsTimeBased(), and SetClusterTime().

std::multimap<int, PndSttSkewedHit*> PndSttCellTrackFinderData::fCombinedSkewedHits
private

Definition at line 139 of file PndSttCellTrackFinderData.h.

Referenced by AddHits(), clear(), and GetCombinedSkewedHits().

PndSttGeometryMap* PndSttCellTrackFinderData::fGeometryMap
private
std::map<int, std::vector<int> > PndSttCellTrackFinderData::fHitNeighbors
private
std::map<int, std::vector<int> > PndSttCellTrackFinderData::fHitNeighborsWithoutEdges
private
std::map<int, std::vector<int> > PndSttCellTrackFinderData::fHitNeighborsWithoutSkewed
private
std::vector<FairHit*> PndSttCellTrackFinderData::fHits
private
std::vector<FairHit*> PndSttCellTrackFinderData::fHitsOrig
private
std::map<int, FairLink> PndSttCellTrackFinderData::fMapHitToFairLink
private
std::map<int, FairLink> PndSttCellTrackFinderData::fMapHitToFairLinkOrig
private

Definition at line 136 of file PndSttCellTrackFinderData.h.

Referenced by AddHits(), and GenerateNeighborhoodData().

std::map<int, int> PndSttCellTrackFinderData::fMapTubeIdToHit
private
std::map<int, TVector3> PndSttCellTrackFinderData::fMapTubeIdToPos
private

Definition at line 149 of file PndSttCellTrackFinderData.h.

Referenced by GetMapTubeIdToPos(), and PndSttCellTrackFinderData().

int PndSttCellTrackFinderData::fNumHits
private

Definition at line 143 of file PndSttCellTrackFinderData.h.

Referenced by GenerateNeighborhoodData(), and GetNumHits().

int PndSttCellTrackFinderData::fNumHitsWithoutDouble
private
Bool_t PndSttCellTrackFinderData::fRunTimeBased
private

Definition at line 145 of file PndSttCellTrackFinderData.h.

Referenced by GenerateNeighborhoodData(), and SetRunTimeBased().

std::map<int, std::vector<int> > PndSttCellTrackFinderData::fSeparations
private

Definition at line 153 of file PndSttCellTrackFinderData.h.

Referenced by clear(), GetSeparations(), PrintInfo(), and SeparateNeighbors().

std::map<int, std::vector<int> > PndSttCellTrackFinderData::fSeparationsWithoutEdges
private
std::map<int, std::vector<int> > PndSttCellTrackFinderData::fSeparationsWithoutSkewed
private
PndSttStrawMap* PndSttCellTrackFinderData::fStrawMap
private

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