29 src_(iConfig.getParameter<edm::
InputTag>(
"src")),
30 srcQualityMap_(iConfig.getParameter<edm::
InputTag>(
"assomap")),
31 prescfilename_(iConfig.getParameter<std::
string>(
"PrescFileName")),
32 presctreename_(iConfig.getParameter<std::
string>(
"PrescTreeName"))
35 produces<AliClusterValueMap>();
36 produces<AliTrackTakenClusterValueMap>();
46 std::cout<<
"in AlignmentPrescaler::beginJob"<<std::flush;
49 tpresc_->BuildIndex(
"DetId");
50 tpresc_->SetBranchStatus(
"*",0);
51 tpresc_->SetBranchStatus(
"DetId",1);
52 tpresc_->SetBranchStatus(
"PrescaleFactor",1);
53 tpresc_->SetBranchStatus(
"PrescaleFactorOverlap",1);
54 cout<<
" Branches activated "<<std::flush;
59 tpresc_->SetBranchAddress(
"DetId",&
detid_);
62 cout<<
" addressed "<<std::flush;
65 cout<<
" ok "<<std::endl;
88 std::vector<int> trackflags(Tracks->size(),0);
94 for(std::vector<reco::Track>::const_iterator ittrk = Tracks->begin(), edtrk = Tracks->end(); ittrk != edtrk; ++ittrk){
99 bool firstTakenHit=
false;
108 tpresc_->GetEntryWithIndex(tmpdetid);
118 bool isOverlapHit=
false;
128 const std::type_info &
type =
typeid(*hit);
138 tmpflag=InValMap[stripclust];
140 if(tmpflag.isOverlap())isOverlapHit=
true;
147 else if (stripType==2) {
151 tmpflag=InValMap[stripclust];
153 if(tmpflag.isOverlap())isOverlapHit=
true;
166 tmpflag=InValMap[pixclust];
168 if(tmpflag.isOverlap())isOverlapHit=
true;
183 tmpflag.SetTakenFlag();
188 InValMap[stripclust]=tmpflag;
190 else if(stripType==2){
192 InValMap[stripclust]=tmpflag;
194 else std::cout<<
"Unknown type of strip hit"<<std::endl;
198 InValMap[pixclust]=tmpflag;
213 trackflags[ittrk-Tracks->begin()]=ntakenhits;
226 auto OutVM = std::make_unique<AliClusterValueMap>();
232 auto trkVM = std::make_unique<AliTrackTakenClusterValueMap>();
234 trkmapfiller.insert(Tracks,trackflags.begin(),trackflags.end() );
ClusterRef cluster() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
unsigned int tibLayer(const DetId &id) const
AlignmentPrescaler(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
uint32_t rawId() const
get the raw id
edm::InputTag srcQualityMap_
unsigned int tidSide(const DetId &id) const
float overlapPrescFactor_
ClusterRef cluster() const
std::string prescfilename_
std::string presctreename_
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
unsigned int pxbLayer(const DetId &id) const
ClusterRef cluster() const
unsigned int pxfSide(const DetId &id) const
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
DetId geographicalId() const
unsigned int tecWheel(const DetId &id) const
int layerFromId(const DetId &id, const TrackerTopology *tTopo) const
unsigned int tobLayer(const DetId &id) const
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection