Reimplemented from edm::EDAnalyzer.
Definition at line 262 of file AlignmentStats.cc.
References Alignable::deepComponents(), DEFINE_FWK_MODULE, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), hitmap_, hitsTreeName_, hcalTTPDigis_cfi::id, fastTrackerRecHitType::is2D(), lastSetup_, nhits, outtree_, overlapmap_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, RecoTauValidation_cfi::posX, RecoTauValidation_cfi::posY, edm::ESHandle< T >::product(), 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(), trackerGeometry_, and treefile_.
Referenced by o2olib.O2ORunMgr::executeJob().
265 edm::LogInfo(
"AlignmentStats")<<
"Writing out the TrackStatistics in "<<gDirectory->GetPath()<<std::endl;
273 TTree *hitstree=
new TTree(
"AlignmentHitMap",
"Maps of Hits used for Alignment");
275 unsigned int id=0,
nhits=0,noverlaps=0;
276 float posX(-99999.0),
posY(-77777.0),posZ(-88888.0);
277 float posEta(-6666.0),posPhi(-5555.0),posR(-4444.0);
279 unsigned int layer=0;
280 bool is2D=
false,isStereo=
false;
281 hitstree->Branch(
"DetId", &
id ,
"DetId/i");
282 hitstree->Branch(
"Nhits", &
nhits ,
"Nhits/i");
283 hitstree->Branch(
"Noverlaps",&noverlaps,
"Noverlaps/i");
284 hitstree->Branch(
"SubDet", &subdet,
"SubDet/I");
285 hitstree->Branch(
"Layer", &layer,
"Layer/i");
286 hitstree->Branch(
"is2D" , &is2D,
"is2D/B");
287 hitstree->Branch(
"isStereo", &isStereo,
"isStereo/B");
288 hitstree->Branch(
"posX", &
posX,
"posX/F");
289 hitstree->Branch(
"posY", &
posY,
"posY/F");
290 hitstree->Branch(
"posZ", &posZ,
"posZ/F");
291 hitstree->Branch(
"posR", &posR,
"posR/F");
292 hitstree->Branch(
"posEta", &posEta,
"posEta/F");
293 hitstree->Branch(
"posPhi", &posPhi,
"posPhi/F");
317 const std::vector<Alignable*>& Detunitslist=theAliTracker->
deepComponents();
318 int ndetunits=Detunitslist.size();
319 edm::LogInfo(
"AlignmentStats")<<
"Number of DetUnits in the AlignableTracker: "<< ndetunits<<std::endl;
321 for(
int det_cnt=0;det_cnt< ndetunits;++det_cnt){
340 id=static_cast <uint32_t>( Detunitslist[det_cnt]->id() );
347 hitmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
356 overlapmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
360 posX= Detunitslist[det_cnt]->globalPosition().x();
361 posY= Detunitslist[det_cnt]->globalPosition().y();
362 posZ= Detunitslist[det_cnt]->globalPosition().z();
371 subdet=detid.subdetId();
411 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
const edm::EventSetup * lastSetup_
bool tobIsStereo(const DetId &id) const
unsigned int pxfDisk(const DetId &id) const
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
const TrackerGeometry * trackerGeometry_
const Alignables & deepComponents() const
bool tibIsStereo(const DetId &id) const
bool tidIsDoubleSide(const DetId &id) const
std::string hitsTreeName_
unsigned int tecWheel(const DetId &id) const
T const * product() const
unsigned int tobLayer(const DetId &id) const