CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
CosmicLayerPairs Class Reference

#include <CosmicLayerPairs.h>

Inheritance diagram for CosmicLayerPairs:
SeedLayerPairs

Public Member Functions

 CosmicLayerPairs (std::string geometry)
 
void init (const SiStripRecHit2DCollection &collstereo, const SiStripRecHit2DCollection &collrphi, const SiStripMatchedRecHit2DCollection &collmatched, const edm::EventSetup &iSetup)
 
std::vector
< SeedLayerPairs::LayerPair
operator() ()
 
 ~CosmicLayerPairs ()
 
- Public Member Functions inherited from SeedLayerPairs
 SeedLayerPairs ()
 
 SeedLayerPairs ()
 
virtual ~SeedLayerPairs ()
 
virtual ~SeedLayerPairs ()
 

Private Member Functions

std::vector< const
TrackingRecHit * > 
selectTECHit (const SiStripRecHit2DCollection &collrphi, int side, int disk)
 
std::vector< const
TrackingRecHit * > 
selectTECHit (const SiStripMatchedRecHit2DCollection &collmatch, int side, int disk)
 
std::vector< const
TrackingRecHit * > 
selectTIBHit (const SiStripRecHit2DCollection &collrphi, int layer)
 
std::vector< const
TrackingRecHit * > 
selectTIBHit (const SiStripMatchedRecHit2DCollection &collmatch, int layer)
 
std::vector< const
TrackingRecHit * > 
selectTOBHit (const SiStripRecHit2DCollection &collrphi, int layer)
 
std::vector< const
TrackingRecHit * > 
selectTOBHit (const SiStripMatchedRecHit2DCollection &collmatch, int layer)
 

Private Attributes

std::string _geometry
 
std::vector< BarrelDetLayer
const * > 
bl
 
edm::OwnVector< LayerWithHitsCRACKLayerWithHits
 
std::vector< ForwardDetLayer
const * > 
fneg
 
std::vector< ForwardDetLayer
const * > 
fpos
 
edm::OwnVector< LayerWithHitsMTCCLayerWithHits
 
edm::OwnVector< LayerWithHitsTECMinusLayerWithHits
 
edm::OwnVector< LayerWithHitsTECPlusLayerWithHits
 
edm::OwnVector< LayerWithHitsTIBLayerWithHits
 
edm::OwnVector< LayerWithHitsTOBLayerWithHits
 

Additional Inherited Members

- Public Types inherited from SeedLayerPairs
typedef std::pair< const
LayerWithHits *, const
LayerWithHits * > 
LayerPair
 
typedef std::pair< const
LayerWithHits *, const
LayerWithHits * > 
LayerPair
 

Detailed Description

find all (resonable) pairs of pixel layers

Definition at line 17 of file CosmicLayerPairs.h.

Constructor & Destructor Documentation

CosmicLayerPairs::CosmicLayerPairs ( std::string  geometry)
inline

Definition at line 19 of file CosmicLayerPairs.h.

19 :_geometry(geometry){};//:isFirstCall(true){};
ESHandle< TrackerGeometry > geometry
std::string _geometry
CosmicLayerPairs::~CosmicLayerPairs ( )

Definition at line 250 of file CosmicLayerPairs.cc.

250 {}

Member Function Documentation

void CosmicLayerPairs::init ( const SiStripRecHit2DCollection collstereo,
const SiStripRecHit2DCollection collrphi,
const SiStripMatchedRecHit2DCollection collmatched,
const edm::EventSetup iSetup 
)

Definition at line 254 of file CosmicLayerPairs.cc.

References _geometry, bl, CRACKLayerWithHits, fneg, fpos, edm::EventSetup::get(), MTCCLayerWithHits, edm::OwnVector< T, P >::push_back(), selectTECHit(), selectTIBHit(), selectTOBHit(), TECMinusLayerWithHits, TECPlusLayerWithHits, TIBLayerWithHits, and TOBLayerWithHits.

Referenced by SeedGeneratorForCRack::init(), and SeedGeneratorForCosmics::init().

258  {
260  //_geometry=geometry;
261  //if(isFirstCall){
262  //std::cout << "in isFirtsCall" << std::endl;
264  iSetup.get<TrackerRecoGeometryRecord>().get( track );
265  //std::cout << "about to take barrel" << std::endl;
266  bl=track->barrelLayers();
267  //std::cout << "barrel taken" << std::endl;
268  fpos=track->posTecLayers();
269  //std::cout << "pos forw taken" << std::endl;
270  fneg=track->negTecLayers();
271  //std::cout << "neg forw taken" << std::endl;
272  //isFirstCall=false;
273 
274  if (_geometry=="MTCC"){//we have to distinguish the MTCC and CRACK case because they have special geometries with different neumbering of layers
279  return;
280  }
281  if (_geometry=="CRACK"){
282  CRACKLayerWithHits.push_back(new LayerWithHits(bl[6], selectTOBHit(collmatched, 7)));
283  CRACKLayerWithHits.push_back(new LayerWithHits(bl[5], selectTOBHit(collmatched, 6)));
284  CRACKLayerWithHits.push_back(new LayerWithHits(bl[3], selectTOBHit(collmatched, 4)));
285  CRACKLayerWithHits.push_back(new LayerWithHits(bl[2], selectTOBHit(collmatched, 3)));
293  CRACKLayerWithHits.push_back(new LayerWithHits(bl[4], selectTOBHit(collmatched, 5)));
294  CRACKLayerWithHits.push_back(new LayerWithHits(bl[1], selectTOBHit(collmatched, 2)));
295  CRACKLayerWithHits.push_back(new LayerWithHits(bl[0], selectTOBHit(collmatched, 1)));
296  return;
297  }
298 
299  TIBLayerWithHits.push_back(new LayerWithHits(bl[3], selectTIBHit(collrphi, 1))); //layer
300  //std::cout << "TIB 0" << std::endl;
301  TIBLayerWithHits.push_back(new LayerWithHits(bl[4], selectTIBHit(collrphi, 2)));
302  //std::cout << "TIB 1" << std::endl;
303  TIBLayerWithHits.push_back(new LayerWithHits(bl[5], selectTIBHit(collrphi, 3)));
304  //std::cout << "TIB 2" << std::endl;
305  TIBLayerWithHits.push_back(new LayerWithHits(bl[6], selectTIBHit(collrphi, 4)));
306  //std::cout << "TIB 3" << std::endl;
307 
308  TOBLayerWithHits.push_back(new LayerWithHits(bl[7], selectTOBHit(collrphi, 1)));
309  //std::cout << "TOB 0" << std::endl;
310  TOBLayerWithHits.push_back(new LayerWithHits(bl[8], selectTOBHit(collrphi, 2)));
311  //std::cout << "TOB 1" << std::endl;
312  TOBLayerWithHits.push_back(new LayerWithHits(bl[9], selectTOBHit(collrphi, 3)));
313  //std::cout << "TOB 2" << std::endl;
314  TOBLayerWithHits.push_back(new LayerWithHits(bl[10], selectTOBHit(collrphi, 4)));
315  //std::cout << "TOB 3" << std::endl;
316  TOBLayerWithHits.push_back(new LayerWithHits(bl[11], selectTOBHit(collrphi, 5)));
317  //std::cout << "TOB 4" << std::endl;
318  TOBLayerWithHits.push_back(new LayerWithHits(bl[12], selectTOBHit(collrphi, 6)));
319  //std::cout << "TOB 5" << std::endl;
320 
321 
322  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[0], selectTECHit(collrphi, 2, 1))); //side, disk
323  //std::cout << "wheel 0" << std::endl;
324  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[1], selectTECHit(collrphi, 2, 2)));
325  //std::cout << "wheel 1" << std::endl;
326  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[2], selectTECHit(collrphi, 2, 3)));
327  //std::cout << "wheel 2" << std::endl;
328  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[3], selectTECHit(collrphi, 2, 4)));
329  //std::cout << "wheel 3" << std::endl;
330  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[4], selectTECHit(collrphi, 2, 5)));
331  //std::cout << "wheel 4" << std::endl;
332  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[5], selectTECHit(collrphi, 2, 6)));
333  //std::cout << "wheel 5" << std::endl;
334  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[6], selectTECHit(collrphi, 2, 7)));
335  //std::cout << "wheel 6" << std::endl;
336  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[7], selectTECHit(collrphi, 2, 8)));
337  //std::cout << "wheel 7" << std::endl;
338  TECPlusLayerWithHits.push_back(new LayerWithHits(fpos[8], selectTECHit(collrphi, 2, 9)));
339  //std::cout << "wheel 8" << std::endl;
340 
341  TECMinusLayerWithHits.push_back(new LayerWithHits(fneg[0], selectTECHit(collrphi, 1, 1))); //side, disk
342  //std::cout << "wheel 0" << std::endl;
344  //std::cout << "wheel 1" << std::endl;
346  //std::cout << "wheel 2" << std::endl;
348  //std::cout << "wheel 3" << std::endl;
350  //std::cout << "wheel 4" << std::endl;
352  //std::cout << "wheel 5" << std::endl;
354  //std::cout << "wheel 6" << std::endl;
356  //std::cout << "wheel 7" << std::endl;
358  //std::cout << "wheel 8" << std::endl;
359 }
std::vector< const TrackingRecHit * > selectTOBHit(const SiStripRecHit2DCollection &collrphi, int layer)
std::vector< const TrackingRecHit * > selectTIBHit(const SiStripRecHit2DCollection &collrphi, int layer)
edm::OwnVector< LayerWithHits > TIBLayerWithHits
edm::OwnVector< LayerWithHits > TOBLayerWithHits
void push_back(D *&d)
Definition: OwnVector.h:280
std::vector< const TrackingRecHit * > selectTECHit(const SiStripRecHit2DCollection &collrphi, int side, int disk)
std::vector< BarrelDetLayer const * > bl
edm::OwnVector< LayerWithHits > MTCCLayerWithHits
edm::OwnVector< LayerWithHits > TECMinusLayerWithHits
edm::OwnVector< LayerWithHits > CRACKLayerWithHits
const T & get() const
Definition: EventSetup.h:55
std::vector< ForwardDetLayer const * > fneg
std::vector< ForwardDetLayer const * > fpos
edm::OwnVector< LayerWithHits > TECPlusLayerWithHits
std::string _geometry
std::vector< SeedLayerPairs::LayerPair > CosmicLayerPairs::operator() ( )
virtual

Implements SeedLayerPairs.

Definition at line 13 of file CosmicLayerPairs.cc.

References _geometry, CRACKLayerWithHits, Exception, MTCCLayerWithHits, query::result, TECMinusLayerWithHits, TECPlusLayerWithHits, TIBLayerWithHits, and TOBLayerWithHits.

14 {
15  std::vector<SeedLayerPairs::LayerPair> result;
16 
17  if (_geometry=="STANDARD"){
18 // result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[1], &TIBLayerWithHits[0]));
19 // result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[2], &TIBLayerWithHits[0]));
20 
21  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
22  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
23  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
24 
27 
30 
33 
36 
39 
42 
45 
47 
48 
51 
54 
57 
60 
63 
66 
69 
71 
72 
73  }
74  else if(_geometry=="TECPAIRS_TOBTRIPLETS"){
77 
80 
83 
86 
89 
92 
95 
97 
98 
101 
104 
107 
110 
113 
116 
119 
121 
122 
123  }
124  else if (_geometry=="MTCC"){
127  //IMPORTANT
128  // The seed from overlaps must be at the end
131  }
132  else if (_geometry=="CRACK"){
133  //TODO: clean all this. Now this is a random choice of layers
148  }
149  else if (_geometry=="TIBD+"){
150  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[1],&TIBLayerWithHits[0]));
151  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[2],&TIBLayerWithHits[3]));
152  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0],&TIBLayerWithHits[0]));
153  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[1],&TIBLayerWithHits[1]));
154  }
155  else if (_geometry=="TOB") {
156  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
157  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
158  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
159 
160  }
161  else if(_geometry=="TIBTOB") {
162  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[1], &TIBLayerWithHits[0]));
163  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[2], &TIBLayerWithHits[0]));
164 
165  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
166  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
167  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
168 
169  }
170  else if (_geometry=="TEC+") {
173 
176 
179 
182 
185 
188 
191 
193 
194  }
195  else if (_geometry=="CkfTIBD+"){
196  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0], &TIBLayerWithHits[1]));
197  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[2], &TIBLayerWithHits[3]));
198  }
199  else if (_geometry=="CkfTIBTOB"){
200  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0], &TIBLayerWithHits[1]));
201  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0], &TIBLayerWithHits[2]));
202 
203  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
204  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
205  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
206  }
207  else if (_geometry=="CkfTIF3"){
208  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0], &TIBLayerWithHits[1]));
209  result.push_back( SeedLayerPairs::LayerPair(&TIBLayerWithHits[0], &TIBLayerWithHits[2]));
210 
211  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
212  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
213  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
214 
217 
220 
223 
226 
229 
232 
235 
237 
238  }
239  else if (_geometry=="CkfTOB"){
240  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[0], &TOBLayerWithHits[1]));
241  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[0], &TOBLayerWithHits[2]));
242 
243  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[4]));
244  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[4], &TOBLayerWithHits[5]));
245  result.push_back( SeedLayerPairs::LayerPair(&TOBLayerWithHits[3], &TOBLayerWithHits[5]));
246  }
247  else {throw cms::Exception("CosmicLayerPairs") << "The geometry " << _geometry << " is not implemented ";}
248  return result;
249 }
edm::OwnVector< LayerWithHits > TIBLayerWithHits
edm::OwnVector< LayerWithHits > TOBLayerWithHits
tuple result
Definition: query.py:137
edm::OwnVector< LayerWithHits > MTCCLayerWithHits
edm::OwnVector< LayerWithHits > TECMinusLayerWithHits
edm::OwnVector< LayerWithHits > CRACKLayerWithHits
edm::OwnVector< LayerWithHits > TECPlusLayerWithHits
std::pair< const LayerWithHits *, const LayerWithHits * > LayerPair
std::string _geometry
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTECHit ( const SiStripRecHit2DCollection collrphi,
int  side,
int  disk 
)
private

Definition at line 361 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTECDisk().

Referenced by init().

363  {
364  std::vector<const TrackingRecHit*> theChoosedHits;
366  edmNew::copyDetSetRange(collrphi, theChoosedHits, acc.stripTECDisk(side,disk));
367  return theChoosedHits;
368 
369 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTECSameDiskComparator > stripTECDisk(int side, int disk)
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTECHit ( const SiStripMatchedRecHit2DCollection collmatch,
int  side,
int  disk 
)
private

Definition at line 390 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTECDisk().

392  {
393  std::vector<const TrackingRecHit*> theChoosedHits;
395  //std::cout << "in selectTECHit" << std::endl;
396  edmNew::copyDetSetRange(collmatch,theChoosedHits,acc.stripTECDisk(side,disk));
397  return theChoosedHits;
398 
399 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTECSameDiskComparator > stripTECDisk(int side, int disk)
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTIBHit ( const SiStripRecHit2DCollection collrphi,
int  layer 
)
private

Definition at line 371 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTIBLayer().

Referenced by init().

372  {
373  std::vector<const TrackingRecHit*> theChoosedHits;
375  //std::cout << "in selectTIBHit" << std::endl;
376  edmNew::copyDetSetRange(collrphi,theChoosedHits,acc.stripTIBLayer(layer));
377  return theChoosedHits;
378 
379 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTIBSameLayerComparator > stripTIBLayer(int layer)
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTIBHit ( const SiStripMatchedRecHit2DCollection collmatch,
int  layer 
)
private

Definition at line 401 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTIBLayer().

402  {
403  std::vector<const TrackingRecHit*> theChoosedHits;
405  //std::cout << "in selectTIBHit" << std::endl;
406  edmNew::copyDetSetRange(collmatch,theChoosedHits,acc.stripTIBLayer(layer));
407  return theChoosedHits;
408 
409 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTIBSameLayerComparator > stripTIBLayer(int layer)
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTOBHit ( const SiStripRecHit2DCollection collrphi,
int  layer 
)
private

Definition at line 381 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTOBLayer().

Referenced by init().

382  {
383  std::vector<const TrackingRecHit*> theChoosedHits;
385  //std::cout << "in selectTOBHit" << std::endl;
386  edmNew::copyDetSetRange(collrphi,theChoosedHits,acc.stripTOBLayer(layer));
387  return theChoosedHits;
388 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTOBSameLayerComparator > stripTOBLayer(int layer)
std::vector< const TrackingRecHit * > CosmicLayerPairs::selectTOBHit ( const SiStripMatchedRecHit2DCollection collmatch,
int  layer 
)
private

Definition at line 411 of file CosmicLayerPairs.cc.

References edmNew::copyDetSetRange(), and TrackerLayerIdAccessor::stripTOBLayer().

412  {
413  std::vector<const TrackingRecHit*> theChoosedHits;
415  //std::cout << "in selectTOBHit" << std::endl;
416  edmNew::copyDetSetRange(collmatch,theChoosedHits,acc.stripTOBLayer(layer));
417  return theChoosedHits;
418 }
void copyDetSetRange(DSTV const &dstv, std::vector< T const * > &v, std::pair< A, B > const &sel)
std::pair< DetId, DetIdTOBSameLayerComparator > stripTOBLayer(int layer)

Member Data Documentation

std::string CosmicLayerPairs::_geometry
private

Definition at line 36 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

std::vector<BarrelDetLayer const*> CosmicLayerPairs::bl
private

Definition at line 38 of file CosmicLayerPairs.h.

Referenced by init().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::CRACKLayerWithHits
private

Definition at line 46 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

std::vector<ForwardDetLayer const*> CosmicLayerPairs::fneg
private

Definition at line 40 of file CosmicLayerPairs.h.

Referenced by init().

std::vector<ForwardDetLayer const*> CosmicLayerPairs::fpos
private

Definition at line 39 of file CosmicLayerPairs.h.

Referenced by init().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::MTCCLayerWithHits
private

Definition at line 45 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TECMinusLayerWithHits
private

Definition at line 42 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TECPlusLayerWithHits
private

Definition at line 41 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TIBLayerWithHits
private

Definition at line 43 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().

edm::OwnVector<LayerWithHits> CosmicLayerPairs::TOBLayerWithHits
private

Definition at line 44 of file CosmicLayerPairs.h.

Referenced by init(), and operator()().