Reimplemented from edm::EDAnalyzer.
Definition at line 264 of file AlignmentStats.cc.
References Alignable::deepComponents(), cond::rpcobgas::detid, PXFDetId::disk(), TIDDetId::diskNumber(), PV3DBase< T, PVType, FrameType >::eta(), hitmap_, hitsTreeName_, ExpressReco_HICollisions_FallBack::id, TOBDetId::isDoubleSide(), TIBDetId::isDoubleSide(), TIDDetId::isDoubleSide(), TECDetId::isDoubleSide(), TOBDetId::isStereo(), TIBDetId::isStereo(), TIDDetId::isStereo(), TECDetId::isStereo(), PXBDetId::layer(), TOBDetId::layerNumber(), TIBDetId::layerNumber(), outtree_, overlapmap_, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, DetId::subdetId(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, SiStripDetId::TOB, trackerGeometry_, treefile_, and TECDetId::wheelNumber().
267 edm::LogInfo(
"AlignmentStats")<<
"Writing out the TrackStatistics in "<<gDirectory->GetPath()<<std::endl;
275 TTree *hitstree=
new TTree(
"AlignmentHitMap",
"Maps of Hits used for Alignment");
277 unsigned int id=0,nhits=0,noverlaps=0;
278 float posX(-99999.0),posY(-77777.0),posZ(-88888.0);
279 float posEta(-6666.0),posPhi(-5555.0),posR(-4444.0);
281 unsigned int layer=0;
282 bool is2D=
false,isStereo=
false;
283 hitstree->Branch(
"DetId", &
id ,
"DetId/i");
284 hitstree->Branch(
"Nhits", &nhits ,
"Nhits/i");
285 hitstree->Branch(
"Noverlaps",&noverlaps,
"Noverlaps/i");
286 hitstree->Branch(
"SubDet", &subdet,
"SubDet/I");
287 hitstree->Branch(
"Layer", &layer,
"Layer/i");
288 hitstree->Branch(
"is2D" , &is2D,
"is2D/B");
289 hitstree->Branch(
"isStereo", &isStereo,
"isStereo/B");
290 hitstree->Branch(
"posX", &posX,
"posX/F");
291 hitstree->Branch(
"posY", &posY,
"posY/F");
292 hitstree->Branch(
"posZ", &posZ,
"posZ/F");
293 hitstree->Branch(
"posR", &posR,
"posR/F");
294 hitstree->Branch(
"posEta", &posEta,
"posEta/F");
295 hitstree->Branch(
"posPhi", &posPhi,
"posPhi/F");
315 const std::vector<Alignable*>& Detunitslist=theAliTracker->
deepComponents();
316 int ndetunits=Detunitslist.size();
317 edm::LogInfo(
"AlignmentStats")<<
"Number of DetUnits in the AlignableTracker: "<< ndetunits<<std::endl;
319 for(
int det_cnt=0;det_cnt< ndetunits;++det_cnt){
338 id=static_cast <uint32_t>( Detunitslist[det_cnt]->id() );
345 hitmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
354 overlapmap_.insert(pair<uint32_t, uint32_t>(
id, 0));
358 posX= Detunitslist[det_cnt]->globalPosition().x();
359 posY= Detunitslist[det_cnt]->globalPosition().y();
360 posZ= Detunitslist[det_cnt]->globalPosition().z();
369 subdet=
detid.subdetId();
374 layer=pxbdet.
layer();
386 layer=tibdet.layerNumber();
387 is2D=tibdet.isDoubleSide();
388 isStereo=tibdet.isStereo();
392 layer=tiddet.diskNumber();
393 is2D=tiddet.isDoubleSide();
394 isStereo=tiddet.isStereo();
398 layer=tobdet.layerNumber();
399 is2D=tobdet.isDoubleSide();
400 isStereo=tobdet.isStereo();
404 layer=tecdet.wheelNumber();
405 is2D=tecdet.isDoubleSide();
406 isStereo=tecdet.isStereo();
409 edm::LogError(
"AlignmentStats")<<
"Detector not belonging neither to pixels nor to strips! Skipping it. SubDet= "<<subdet;
unsigned int layer() const
layer id
const TrackerGeometry * trackerGeometry_
const Alignables & deepComponents() const
std::string hitsTreeName_