Reimplemented from edm::EDAnalyzer.
Definition at line 263 of file AlignmentStats.cc.
References Alignable::deepComponents(), cond::rpcobgas::detid, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), hitmap_, hitsTreeName_, lastSetup_, outtree_, overlapmap_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, edm::ESHandle< class >::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_.
266 edm::LogInfo(
"AlignmentStats")<<
"Writing out the TrackStatistics in "<<gDirectory->GetPath()<<std::endl;
274 TTree *hitstree=
new TTree(
"AlignmentHitMap",
"Maps of Hits used for Alignment");
276 unsigned int id=0,nhits=0,noverlaps=0;
277 float posX(-99999.0),posY(-77777.0),posZ(-88888.0);
278 float posEta(-6666.0),posPhi(-5555.0),posR(-4444.0);
280 unsigned int layer=0;
281 bool is2D=
false,isStereo=
false;
282 hitstree->Branch(
"DetId", &
id ,
"DetId/i");
283 hitstree->Branch(
"Nhits", &nhits ,
"Nhits/i");
284 hitstree->Branch(
"Noverlaps",&noverlaps,
"Noverlaps/i");
285 hitstree->Branch(
"SubDet", &subdet,
"SubDet/I");
286 hitstree->Branch(
"Layer", &layer,
"Layer/i");
287 hitstree->Branch(
"is2D" , &is2D,
"is2D/B");
288 hitstree->Branch(
"isStereo", &isStereo,
"isStereo/B");
289 hitstree->Branch(
"posX", &posX,
"posX/F");
290 hitstree->Branch(
"posY", &posY,
"posY/F");
291 hitstree->Branch(
"posZ", &posZ,
"posZ/F");
292 hitstree->Branch(
"posR", &posR,
"posR/F");
293 hitstree->Branch(
"posEta", &posEta,
"posEta/F");
294 hitstree->Branch(
"posPhi", &posPhi,
"posPhi/F");
318 const std::vector<Alignable*>& Detunitslist=theAliTracker->
deepComponents();
319 int ndetunits=Detunitslist.size();
320 edm::LogInfo(
"AlignmentStats")<<
"Number of DetUnits in the AlignableTracker: "<< ndetunits<<std::endl;
322 for(
int det_cnt=0;det_cnt< ndetunits;++det_cnt){
341 id=static_cast <uint32_t>( Detunitslist[det_cnt]->id() );
348 hitmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
357 overlapmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
361 posX= Detunitslist[det_cnt]->globalPosition().x();
362 posY= Detunitslist[det_cnt]->globalPosition().y();
363 posZ= Detunitslist[det_cnt]->globalPosition().z();
372 subdet=
detid.subdetId();
412 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
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
T const * product() const
std::string hitsTreeName_
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const