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;
122 const SiStripRecHit1D* stripHit1D =
dynamic_cast<const SiStripRecHit1D*
>(hit);
123 const SiStripRecHit2D* stripHit2D =
dynamic_cast<const SiStripRecHit2D*
>(hit);
128 const std::type_info &
type =
typeid(*hit);
129 if (type ==
typeid(SiStripRecHit1D)) stripType=1;
130 else if (type ==
typeid(SiStripRecHit2D)) stripType=2;
137 SiStripRecHit1D::ClusterRef stripclust(stripHit1D->cluster());
138 tmpflag=InValMap[stripclust];
140 if(tmpflag.isOverlap())isOverlapHit=
true;
147 else if (stripType==2) {
150 SiStripRecHit2D::ClusterRef stripclust(stripHit2D->cluster());
151 tmpflag=InValMap[stripclust];
153 if(tmpflag.isOverlap())isOverlapHit=
true;
166 tmpflag=InValMap[pixclust];
168 if(tmpflag.isOverlap())isOverlapHit=
true;
183 tmpflag.SetTakenFlag();
187 SiStripRecHit1D::ClusterRef stripclust(stripHit1D->cluster());
188 InValMap[stripclust]=tmpflag;
190 else if(stripType==2){
191 SiStripRecHit1D::ClusterRef stripclust(stripHit2D->cluster());
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;
234 trkmapfiller.
insert(Tracks,trackflags.begin(),trackflags.end() );
unsigned int tibLayer(const DetId &id) const
AlignmentPrescaler(const edm::ParameterSet &iConfig)
#define DEFINE_FWK_MODULE(type)
unsigned int pxfDisk(const DetId &id) const
void insert(const H &h, I begin, I end)
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_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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
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