#include <ChamberSegmentUtility.h>
Public Member Functions | |
ChamberSegmentUtility (const edm::Event &, const edm::EventSetup &) | |
const std::map< int, std::vector< CSCSegment > > & | getCSClist () const |
std::vector< CSCRecHit2D > | getCSCRHmap (CSCSegment) |
std::vector< CSCSegment > | getCSCSegmentsInChamber (CSCDetId) |
const std::map< int, std::vector< DTRecSegment4D > > & | getDTlist () const |
std::vector< DTRecHit1D > | getDTRHmap (DTRecSegment4D) |
std::vector< DTRecSegment4D > | getDTSegmentsInChamber (DTChamberId) |
Private Attributes | |
edm::Handle < DTRecSegment4DCollection > | all4DSegments |
edm::ESHandle< CSCGeometry > | cscGeometry |
std::vector< CSCSegment > | cscseg |
std::map< int, std::vector < CSCSegment > > | cscsegMap |
edm::Handle< CSCSegmentCollection > | CSCSegments |
edm::ESHandle< DTGeometry > | dtGeom |
std::vector< DTRecSegment4D > | dtseg |
std::map< int, std::vector < DTRecSegment4D > > | dtsegMap |
std::vector< DTRecHit1D > | phiSegRH |
CSCDetId | selectedCSC |
DTChamberId | selectedDT |
std::vector< DTRecHit1D > | zSegRH |
Class: ChamberSegmentUtility
Description: utility class for the dynamical truncation algorithm
Authors : D. Pagano & G. Bruno - UCL Louvain
Definition at line 35 of file ChamberSegmentUtility.h.
ChamberSegmentUtility::ChamberSegmentUtility | ( | const edm::Event & | Event, |
const edm::EventSetup & | Setup | ||
) |
Definition at line 38 of file ChamberSegmentUtility.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), and getHLTprescales::index.
{ Setup.get<MuonGeometryRecord>().get(cscGeometry); Event.getByLabel("cscSegments", CSCSegments); Setup.get<MuonGeometryRecord>().get(dtGeom); Event.getByLabel("dt4DSegments", all4DSegments); unsigned int index = 0; for ( CSCSegmentCollection::id_iterator chamberId = CSCSegments->id_begin(); chamberId != CSCSegments->id_end(); ++chamberId, ++index ) { CSCSegmentCollection::range range = CSCSegments->get((*chamberId)); for (CSCSegmentCollection::const_iterator segment = range.first; segment!=range.second; ++segment) { if ((*chamberId).station() == 1) cscsegMap[1].push_back(*segment); if ((*chamberId).station() == 2) cscsegMap[2].push_back(*segment); if ((*chamberId).station() == 3) cscsegMap[3].push_back(*segment); if ((*chamberId).station() == 4) cscsegMap[4].push_back(*segment); } } DTRecSegment4DCollection::id_iterator chamberIdIt; for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt){ DTRecSegment4DCollection::range range = all4DSegments->get((*chamberIdIt)); for (DTRecSegment4DCollection::const_iterator segment = range.first; segment!=range.second; ++segment){ if ((*chamberIdIt).station() == 1) dtsegMap[1].push_back(*segment); if ((*chamberIdIt).station() == 2) dtsegMap[2].push_back(*segment); if ((*chamberIdIt).station() == 3) dtsegMap[3].push_back(*segment); if ((*chamberIdIt).station() == 4) dtsegMap[4].push_back(*segment); } } }
const std::map<int, std::vector<CSCSegment> >& ChamberSegmentUtility::getCSClist | ( | ) | const [inline] |
Definition at line 51 of file ChamberSegmentUtility.h.
References cscsegMap.
Referenced by DynamicTruncation::filteringAlgo().
{ return cscsegMap; };
vector< CSCRecHit2D > ChamberSegmentUtility::getCSCRHmap | ( | CSCSegment | selected | ) |
Definition at line 132 of file ChamberSegmentUtility.cc.
References getHLTprescales::index, and CSCSegment::parameters().
Referenced by DynamicTruncation::filteringAlgo().
{ vector<CSCRecHit2D> allchRH; // loop on segments 4D unsigned int index = 0; for ( CSCSegmentCollection::id_iterator chamberId = CSCSegments->id_begin(); chamberId != CSCSegments->id_end(); ++chamberId, ++index ) { // Get the range for the corresponding ChamberId CSCSegmentCollection::range range = CSCSegments->get((*chamberId)); // Loop over the rechits of this DetUnit for (CSCSegmentCollection::const_iterator segment = range.first; segment!=range.second; ++segment) { if((*segment).parameters() == selected.parameters()) { allchRH = (*segment).specificRecHits(); } } } return allchRH; }
vector< CSCSegment > ChamberSegmentUtility::getCSCSegmentsInChamber | ( | CSCDetId | sel | ) |
Definition at line 83 of file ChamberSegmentUtility.cc.
References CSCDetId::chamber(), and getHLTprescales::index.
{ // loop on segments 4D unsigned int index = 0; for ( CSCSegmentCollection::id_iterator chamberId = CSCSegments->id_begin(); chamberId != CSCSegments->id_end(); ++chamberId, ++index ) { if ((*chamberId).chamber() != sel.chamber()) continue; // Get the range for the corresponding ChamberId CSCSegmentCollection::range range = CSCSegments->get((*chamberId)); // Loop over the rechits of this DetUnit for (CSCSegmentCollection::const_iterator segment = range.first; segment!=range.second; ++segment) { cscseg.push_back(*segment); } } return cscseg; }
const std::map<int, std::vector<DTRecSegment4D> >& ChamberSegmentUtility::getDTlist | ( | ) | const [inline] |
Definition at line 48 of file ChamberSegmentUtility.h.
References dtsegMap.
Referenced by DynamicTruncation::filteringAlgo().
{ return dtsegMap; };
vector< DTRecHit1D > ChamberSegmentUtility::getDTRHmap | ( | DTRecSegment4D | selected | ) |
Definition at line 158 of file ChamberSegmentUtility.cc.
References DTRecSegment4D::parameters(), and DTRecSegment2D::specificRecHits().
Referenced by DynamicTruncation::filteringAlgo().
{ vector<DTRecHit1D> allchRH; phiSegRH.clear(); zSegRH.clear(); // loop on segments 4D DTRecSegment4DCollection::id_iterator chamberIdIt; for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt){ // Get the range for the corresponding ChamberId DTRecSegment4DCollection::range range = all4DSegments->get((*chamberIdIt)); // Loop over the rechits of this DetUnit for (DTRecSegment4DCollection::const_iterator segment = range.first; segment!=range.second; ++segment){ if((*segment).parameters() == selected.parameters()) { if((*segment).hasPhi()){ const DTChamberRecSegment2D* phiSeg = (*segment).phiSegment(); phiSegRH = phiSeg->specificRecHits(); } if((*segment).hasZed()){ const DTSLRecSegment2D* zSeg = (*segment).zSegment(); zSegRH = zSeg->specificRecHits(); } // RecHits will be ordered later for (vector<DTRecHit1D>::const_iterator itphi = phiSegRH.begin(); itphi != phiSegRH.end(); itphi++) allchRH.push_back(*itphi); for (vector<DTRecHit1D>::iterator itz = zSegRH.begin(); itz < zSegRH.end(); itz++) allchRH.push_back(*itz); } } } return allchRH; }
vector< DTRecSegment4D > ChamberSegmentUtility::getDTSegmentsInChamber | ( | DTChamberId | sel | ) |
Definition at line 107 of file ChamberSegmentUtility.cc.
{ // loop on segments 4D DTRecSegment4DCollection::id_iterator chamberIdIt; for (chamberIdIt = all4DSegments->id_begin(); chamberIdIt != all4DSegments->id_end(); ++chamberIdIt){ if (*chamberIdIt != sel) continue; // Get the range for the corresponding ChamberId DTRecSegment4DCollection::range range = all4DSegments->get((*chamberIdIt)); // Loop over the rechits of this DetUnit for (DTRecSegment4DCollection::const_iterator segment = range.first; segment!=range.second; ++segment){ dtseg.push_back(*segment); } } return dtseg; }
Definition at line 65 of file ChamberSegmentUtility.h.
Definition at line 62 of file ChamberSegmentUtility.h.
std::vector<CSCSegment> ChamberSegmentUtility::cscseg [private] |
Definition at line 68 of file ChamberSegmentUtility.h.
std::map<int, std::vector<CSCSegment> > ChamberSegmentUtility::cscsegMap [private] |
Definition at line 70 of file ChamberSegmentUtility.h.
Referenced by getCSClist().
Definition at line 63 of file ChamberSegmentUtility.h.
edm::ESHandle<DTGeometry> ChamberSegmentUtility::dtGeom [private] |
Definition at line 64 of file ChamberSegmentUtility.h.
std::vector<DTRecSegment4D> ChamberSegmentUtility::dtseg [private] |
Definition at line 67 of file ChamberSegmentUtility.h.
std::map<int, std::vector<DTRecSegment4D> > ChamberSegmentUtility::dtsegMap [private] |
Definition at line 69 of file ChamberSegmentUtility.h.
Referenced by getDTlist().
std::vector<DTRecHit1D> ChamberSegmentUtility::phiSegRH [private] |
Definition at line 73 of file ChamberSegmentUtility.h.
CSCDetId ChamberSegmentUtility::selectedCSC [private] |
Definition at line 72 of file ChamberSegmentUtility.h.
DTChamberId ChamberSegmentUtility::selectedDT [private] |
Definition at line 71 of file ChamberSegmentUtility.h.
std::vector<DTRecHit1D> ChamberSegmentUtility::zSegRH [private] |
Definition at line 74 of file ChamberSegmentUtility.h.