Reimplemented from edm::EDAnalyzer.
Definition at line 256 of file AlignmentStats.cc.
References DEFINE_FWK_MODULE, PV3DBase< T, PVType, FrameType >::eta(), hitmap_, hitsTreeName_, triggerObjects_cff::id, fastTrackerRecHitType::is2D(), nhits, outtree_, overlapmap_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, TrackerTopology::pxbLayer(), TrackerTopology::pxfDisk(), DetId::subdetId(), SiStripDetId::TEC, TrackerTopology::tecIsDoubleSide(), TrackerTopology::tecIsStereo(), TrackerTopology::tecWheel(), SiStripDetId::TIB, TrackerTopology::tibIsDoubleSide(), TrackerTopology::tibIsStereo(), TrackerTopology::tibLayer(), SiStripDetId::TID, TrackerTopology::tidIsDoubleSide(), TrackerTopology::tidIsStereo(), TrackerTopology::tidWheel(), SiStripDetId::TOB, TrackerTopology::tobIsDoubleSide(), TrackerTopology::tobIsStereo(), TrackerTopology::tobLayer(), trackerTopology_, and treefile_.
Referenced by o2olib.O2ORunMgr::executeJob().
259 edm::LogInfo(
"AlignmentStats")<<
"Writing out the TrackStatistics in "<<gDirectory->GetPath()<<std::endl;
267 TTree *hitstree=
new TTree(
"AlignmentHitMap",
"Maps of Hits used for Alignment");
269 unsigned int id=0,
nhits=0,noverlaps=0;
270 float posX(-99999.0),
posY(-77777.0),posZ(-88888.0);
271 float posEta(-6666.0),posPhi(-5555.0),posR(-4444.0);
273 unsigned int layer=0;
274 bool is2D=
false,isStereo=
false;
275 hitstree->Branch(
"DetId", &
id ,
"DetId/i");
276 hitstree->Branch(
"Nhits", &
nhits ,
"Nhits/i");
277 hitstree->Branch(
"Noverlaps",&noverlaps,
"Noverlaps/i");
278 hitstree->Branch(
"SubDet", &subdet,
"SubDet/I");
279 hitstree->Branch(
"Layer", &layer,
"Layer/i");
280 hitstree->Branch(
"is2D" , &is2D,
"is2D/B");
281 hitstree->Branch(
"isStereo", &isStereo,
"isStereo/B");
282 hitstree->Branch(
"posX", &
posX,
"posX/F");
283 hitstree->Branch(
"posY", &
posY,
"posY/F");
284 hitstree->Branch(
"posZ", &posZ,
"posZ/F");
285 hitstree->Branch(
"posR", &posR,
"posR/F");
286 hitstree->Branch(
"posEta", &posEta,
"posEta/F");
287 hitstree->Branch(
"posPhi", &posPhi,
"posPhi/F");
305 std::unique_ptr<AlignableTracker> theAliTracker=std::make_unique<AlignableTracker>(&(*trackerGeometry_),
trackerTopology_);
306 const auto& Detunitslist = theAliTracker->deepComponents();
307 int ndetunits=Detunitslist.size();
308 edm::LogInfo(
"AlignmentStats")<<
"Number of DetUnits in the AlignableTracker: "<< ndetunits<<std::endl;
310 for(
int det_cnt=0;det_cnt< ndetunits;++det_cnt){
329 id=static_cast <uint32_t>( Detunitslist[det_cnt]->id() );
336 hitmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
345 overlapmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
349 posX= Detunitslist[det_cnt]->globalPosition().x();
350 posY= Detunitslist[det_cnt]->globalPosition().y();
351 posZ= Detunitslist[det_cnt]->globalPosition().z();
360 subdet=detid.subdetId();
400 edm::LogError(
"AlignmentStats")<<
"Detector not belonging neither to pixels nor to strips! Skipping it. SubDet= "<<subdet;
bool tecIsDoubleSide(const DetId &id) const
bool tobIsDoubleSide(const DetId &id) const
bool tibIsDoubleSide(const DetId &id) const
unsigned int tibLayer(const DetId &id) const
bool tobIsStereo(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
const TrackerTopology * trackerTopology_
unsigned int tidWheel(const DetId &id) const
bool tidIsStereo(const DetId &id) const
bool tecIsStereo(const DetId &id) const
bool is2D(HitType hitType)
unsigned int pxbLayer(const DetId &id) const
bool tibIsStereo(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
std::string hitsTreeName_
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const