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(
"*",
false);
51 tpresc_->SetBranchStatus(
"DetId",
true);
52 tpresc_->SetBranchStatus(
"PrescaleFactor",
true);
53 tpresc_->SetBranchStatus(
"PrescaleFactorOverlap",
true);
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);
136 if(stripHit1D!=
nullptr){
138 tmpflag=InValMap[stripclust];
140 if(tmpflag.isOverlap())isOverlapHit=
true;
147 else if (stripType==2) {
149 if(stripHit2D!=
nullptr){
151 tmpflag=InValMap[stripclust];
153 if(tmpflag.isOverlap())isOverlapHit=
true;
163 if(pixelhit!=
nullptr){
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
~AlignmentPrescaler() override
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
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
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