28 src_(iConfig.getParameter<edm::InputTag>(
"src")),
29 srcQualityMap_(iConfig.getParameter<edm::InputTag>(
"assomap")),
30 prescfilename_(iConfig.getParameter<std::
string>(
"PrescFileName")),
31 presctreename_(iConfig.getParameter<std::
string>(
"PrescTreeName"))
34 produces<AliClusterValueMap>();
35 produces<AliTrackTakenClusterValueMap>();
45 std::cout<<
"in AlignmentPrescaler::beginJob"<<std::flush;
48 tpresc_->BuildIndex(
"DetId");
49 tpresc_->SetBranchStatus(
"*",0);
50 tpresc_->SetBranchStatus(
"DetId",1);
51 tpresc_->SetBranchStatus(
"PrescaleFactor",1);
52 tpresc_->SetBranchStatus(
"PrescaleFactorOverlap",1);
53 cout<<
" Branches activated "<<std::flush;
58 tpresc_->SetBranchAddress(
"DetId",&
detid_);
61 cout<<
" addressed "<<std::flush;
64 cout<<
" ok "<<std::endl;
87 std::vector<int> trackflags(Tracks->size(),0);
93 for(std::vector<reco::Track>::const_iterator ittrk = Tracks->begin(), edtrk = Tracks->end(); ittrk != edtrk; ++ittrk){
98 bool firstTakenHit=
false;
107 tpresc_->GetEntryWithIndex(tmpdetid);
117 bool isOverlapHit=
false;
121 const SiStripRecHit1D* stripHit1D =
dynamic_cast<const SiStripRecHit1D*
>(hit);
122 const SiStripRecHit2D* stripHit2D =
dynamic_cast<const SiStripRecHit2D*
>(hit);
127 const std::type_info &
type =
typeid(*hit);
128 if (type ==
typeid(SiStripRecHit1D)) stripType=1;
129 else if (type ==
typeid(SiStripRecHit2D)) stripType=2;
136 SiStripRecHit1D::ClusterRef stripclust(stripHit1D->cluster());
137 tmpflag=InValMap[stripclust];
139 if(tmpflag.isOverlap())isOverlapHit=
true;
146 else if (stripType==2) {
149 SiStripRecHit2D::ClusterRef stripclust(stripHit2D->cluster());
150 tmpflag=InValMap[stripclust];
152 if(tmpflag.isOverlap())isOverlapHit=
true;
165 tmpflag=InValMap[pixclust];
167 if(tmpflag.isOverlap())isOverlapHit=
true;
182 tmpflag.SetTakenFlag();
186 SiStripRecHit1D::ClusterRef stripclust(stripHit1D->cluster());
187 InValMap[stripclust]=tmpflag;
189 else if(stripType==2){
190 SiStripRecHit1D::ClusterRef stripclust(stripHit2D->cluster());
191 InValMap[stripclust]=tmpflag;
193 else std::cout<<
"Unknown type of strip hit"<<std::endl;
197 InValMap[pixclust]=tmpflag;
212 trackflags[ittrk-Tracks->begin()]=ntakenhits;
233 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