30 srcQualityMap_(iConfig.getParameter<
edm::
InputTag>(
"assomap")),
31 prescfilename_(iConfig.getParameter<
std::
string>(
"PrescFileName")),
32 presctreename_(iConfig.getParameter<
std::
string>(
"PrescTreeName")) {
34 produces<AliClusterValueMap>();
35 produces<AliTrackTakenClusterValueMap>();
44 std::cout <<
"in AlignmentPrescaler::beginJob" << std::flush;
48 tpresc_->SetBranchStatus(
"*",
false);
49 tpresc_->SetBranchStatus(
"DetId",
true);
50 tpresc_->SetBranchStatus(
"PrescaleFactor",
true);
51 tpresc_->SetBranchStatus(
"PrescaleFactorOverlap",
true);
52 cout <<
" Branches activated " << std::flush;
60 cout <<
" addressed " << std::flush;
63 cout <<
" ok " << std::endl;
84 std::vector<int> trackflags(
Tracks->size(), 0);
89 for (std::vector<reco::Track>::const_iterator ittrk =
Tracks->begin(), edtrk =
Tracks->end(); ittrk != edtrk;
95 bool firstTakenHit =
false;
97 for (
auto const&
hit : ittrk->recHits()) {
98 if (!
hit->isValid()) {
102 uint32_t tmpdetid =
hit->geographicalId().rawId();
103 tpresc_->GetEntryWithIndex(tmpdetid);
108 int subdetId =
hit->geographicalId().subdetId();
111 bool isOverlapHit =
false;
121 const std::type_info&
type =
typeid(*hit);
129 if (stripType == 1) {
132 if (stripHit1D !=
nullptr) {
134 tmpflag = InValMap[stripclust];
135 tmpflag.SetDetId(
hit->geographicalId());
136 if (tmpflag.isOverlap())
143 }
else if (stripType == 2) {
145 if (stripHit2D !=
nullptr) {
147 tmpflag = InValMap[stripclust];
148 tmpflag.SetDetId(
hit->geographicalId());
149 if (tmpflag.isOverlap())
163 tmpflag = InValMap[pixclust];
164 tmpflag.SetDetId(
hit->geographicalId());
165 if (tmpflag.isOverlap())
181 tmpflag.SetTakenFlag();
184 if (stripType == 1) {
186 InValMap[stripclust] = tmpflag;
187 }
else if (stripType == 2) {
189 InValMap[stripclust] = tmpflag;
191 std::cout <<
"Unknown type of strip hit" << std::endl;
194 InValMap[pixclust] = tmpflag;
197 if (!firstTakenHit) {
198 firstTakenHit =
true;
208 trackflags[ittrk -
Tracks->begin()] = ntakenhits;
217 auto OutVM = std::make_unique<AliClusterValueMap>();
222 auto trkVM = std::make_unique<AliTrackTakenClusterValueMap>();
224 trkmapfiller.
insert(
Tracks, trackflags.begin(), trackflags.end());