CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Types | Private Attributes | Static Private Attributes
AlignmentStats Class Reference

#include <AlignmentStats.h>

Inheritance diagram for AlignmentStats:
edm::EDAnalyzer

Public Member Functions

 AlignmentStats (const edm::ParameterSet &iConfig)
 
virtual void analyze (const edm::Event &iEvent, const edm::EventSetup &iSetup)
 
void beginJob ()
 
void endJob ()
 
 ~AlignmentStats ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Types

typedef map< uint32_t, uint32_t > DetHitMap
 

Private Attributes

float Chi2n [MAXTRKS_]
 
float Eta [MAXTRKS_]
 
int event_
 
bool firstEvent_
 
DetHitMap hitmap_
 
std::string hitsTreeName_
 
bool keepHitPopulation_
 
bool keepTrackStats_
 
int Nhits [MAXTRKS_][7]
 
unsigned int ntracks
 
TTree * outtree_
 
edm::InputTag overlapAM_
 
DetHitMap overlapmap_
 
float P [MAXTRKS_]
 
float Phi [MAXTRKS_]
 
uint32_t prescale_
 
float Pt [MAXTRKS_]
 
int run_
 
edm::InputTag src_
 
std::string statsTreeName_
 
uint32_t tmpPresc_
 
const TrackerGeometrytrackerGeometry_
 
TFile * treefile_
 

Static Private Attributes

static const int MAXTRKS_ =200
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 27 of file AlignmentStats.h.

Member Typedef Documentation

typedef map<uint32_t,uint32_t> AlignmentStats::DetHitMap
private

Definition at line 60 of file AlignmentStats.h.

Constructor & Destructor Documentation

AlignmentStats::AlignmentStats ( const edm::ParameterSet iConfig)

Definition at line 32 of file AlignmentStats.cc.

References outtree_.

32  :
33  src_(iConfig.getParameter<edm::InputTag>("src")),
34  overlapAM_(iConfig.getParameter<edm::InputTag>("OverlapAssoMap")),
35  keepTrackStats_(iConfig.getParameter<bool>("keepTrackStats")),
36  keepHitPopulation_(iConfig.getParameter<bool>("keepHitStats")),
37  statsTreeName_(iConfig.getParameter<string>("TrkStatsFileName")),
38  hitsTreeName_(iConfig.getParameter<string>("HitStatsFileName")),
39  prescale_(iConfig.getParameter<uint32_t>("TrkStatsPrescale"))
40 {
41 
42  //sanity checks
43 
44  //init
45  outtree_=0;
46 
47 }//end constructor
T getParameter(std::string const &) const
uint32_t prescale_
edm::InputTag src_
std::string statsTreeName_
std::string hitsTreeName_
edm::InputTag overlapAM_
AlignmentStats::~AlignmentStats ( )

Definition at line 49 of file AlignmentStats.cc.

49  {
50  //
51 }

Member Function Documentation

void AlignmentStats::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 89 of file AlignmentStats.cc.

References Chi2n, className(), SiStripRecHit1D::cluster(), SiPixelRecHit::cluster(), SiStripRecHit2D::cluster(), cond::rpcobgas::detid, Eta, edm::EventID::event(), event_, edm::hlt::Exception, firstEvent_, TrackingRecHit::geographicalId(), edm::EventSetup::get(), edm::Event::getByLabel(), hitmap_, edm::EventBase::id(), AlignmentClusterFlag::isOverlap(), TrackingRecHit::isValid(), j, gen::k, MAXTRKS_, Nhits, ntracks, outtree_, overlapAM_, overlapmap_, P, PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, prescale_, Pt, DetId::rawId(), edm::EventID::run(), run_, src_, DetId::subdetId(), SiStripDetId::TEC, SiStripDetId::TIB, SiStripDetId::TID, tmpPresc_, SiStripDetId::TOB, and trackerGeometry_.

89  {
90 
91  //load list of detunits needed then in endJob
92 
93  if(firstEvent_){
94  edm::ESHandle<TrackerGeometry> tmpTkGeometry;
95  iSetup.get<TrackerDigiGeometryRecord>().get(tmpTkGeometry);
96  trackerGeometry_=&(*tmpTkGeometry);
97  firstEvent_=false;
98  }
99 
100 
101  //take trajectories and tracks to loop on
102  // edm::Handle<TrajTrackAssociationCollection> TrackAssoMap;
104  iEvent.getByLabel(src_, Tracks);
105 
106  //take overlap HitAssomap
108  iEvent.getByLabel(overlapAM_, hMap);
109  const AliClusterValueMap &OverlapMap=*hMap;
110 
111  // Initialise
112  run_=1;
113  event_=1;
114  ntracks=0;
115  run_=iEvent.id().run();
116  event_=iEvent.id().event();
117  ntracks=Tracks->size();
118  // if(ntracks>1) std::cout<<"~~~~~~~~~~~~\n For this event processing "<<ntracks<<" tracks"<<std::endl;
119 
120  unsigned int trk_cnt=0;
121 
122  for(int j=0;j<MAXTRKS_;j++){
123  Eta[j]=-9999.0;
124  Phi[j]=-8888.0;
125  P[j] =-7777.0;
126  Pt[j] =-6666.0;
127  Chi2n[j]=-2222.0;
128  for(int k=0;k<7;k++){
129  Nhits[j][k]=0;
130  }
131  }
132 
133  // int npxbhits=0;
134 
135  //loop on tracks
136  for(std::vector<reco::Track>::const_iterator ittrk = Tracks->begin(), edtrk = Tracks->end(); ittrk != edtrk; ++ittrk){
137  Eta[trk_cnt]=ittrk->eta();
138  Phi[trk_cnt]=ittrk->phi();
139  Chi2n[trk_cnt]=ittrk->normalizedChi2();
140  P[trk_cnt]=ittrk->p();
141  Pt[trk_cnt]=ittrk->pt();
142  Nhits[trk_cnt][0]=ittrk->numberOfValidHits();
143 
144  // if(ntracks>1)std::cout<<"Track #"<<trk_cnt+1<<" params: Eta="<< Eta[trk_cnt]<<" Phi="<< Phi[trk_cnt]<<" P="<<P[trk_cnt]<<" Nhits="<<Nhits[trk_cnt][0]<<std::endl;
145 
146  int nhit=0;
147  //loop on tracking rechits
148  //std::cout << " loop on hits of track #" << (itt - tracks->begin()) << std::endl;
149  for (trackingRecHit_iterator ith = ittrk->recHitsBegin(), edh = ittrk->recHitsEnd(); ith != edh; ++ith) {
150 
151  const TrackingRecHit *hit = ith->get(); // ith is an iterator on edm::Ref to rechit
152  if(! hit->isValid())continue;
153  DetId detid = hit->geographicalId();
154  int subDet = detid.subdetId();
155  uint32_t rawId = hit->geographicalId().rawId();
156 
157  // if(subDet==1)npxbhits++;
158 
159  //look if you find this detid in the map
160  DetHitMap::iterator mapiter;
161  mapiter= hitmap_.find(rawId);
162  if(mapiter!=hitmap_.end() ){//present, increase its value by one
163  // hitmap_[rawId]=hitmap_[rawId]+1;
164  ++(hitmap_[rawId]);
165  }
166  else{//not present, let's add this key to the map with value=1
167  hitmap_.insert(pair<uint32_t, uint32_t>(rawId, 1));
168  }
169 
170  AlignmentClusterFlag inval;
171 
172  bool hitInPixel= (subDet==PixelSubdetector::PixelBarrel)||(subDet==PixelSubdetector::PixelEndcap);
173  bool hitInStrip=(subDet==SiStripDetId::TIB) || (subDet==SiStripDetId::TID) ||(subDet==SiStripDetId::TOB) ||(subDet==SiStripDetId::TEC);
174 
175  if(!(hitInPixel||hitInStrip)){
176  //skip only this hit, don't stop everything throwing an exception
177  edm::LogError("AlignmentStats")<<"Hit not belonging neither to pixels nor to strips! Skipping it. SubDet= "<<subDet;
178  continue;
179  }
180 
181  //check also if the hit is an overlap. If yes fill a dedicated hitmap
182  if (hitInStrip){
183  const std::type_info &type = typeid(*hit);
184 
185  if (type == typeid(SiStripRecHit1D)) {
186  //Notice the difference respect to when one loops on Trajectories: the recHit is a TrackingRecHit and not a TransientTrackingRecHit
187  const SiStripRecHit1D* striphit=dynamic_cast<const SiStripRecHit1D*>(hit);
188  if(striphit!=0){
189  SiStripRecHit1D::ClusterRef stripclust(striphit->cluster());
190  inval = OverlapMap[stripclust];
191  }
192  else{
193  // edm::LogError("AlignmentStats")<<"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit1D failed! TypeId of the RecHit: "<<className(*hit);
194  throw cms::Exception("NullPointerError")<<"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit1D failed! TypeId of the RecHit: "<<className(*hit);
195  }
196  }//end if sistriprechit1D
197  if (type == typeid(SiStripRecHit2D)) {
198  const SiStripRecHit2D* striphit=dynamic_cast<const SiStripRecHit2D*>(hit);
199  if(striphit!=0){
200  SiStripRecHit2D::ClusterRef stripclust(striphit->cluster());
201  inval = OverlapMap[stripclust];
202  //cout<<"Taken the Strip Cluster with ProdId "<<stripclust.id() <<"; the Value in the map is "<<inval<<" (DetId is "<<hit->geographicalId().rawId()<<")"<<endl;
203  }
204  else{
205  throw cms::Exception("NullPointerError")<<"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit2D failed! TypeId of the RecHit: "<<className(*hit);
206  // edm::LogError("AlignmentStats")<<"ERROR in <AlignmentStats::analyze>: Dynamic cast of Strip RecHit2D failed! TypeId of the RecHit: "<<className(*hit);
207  }
208  }//end if sistriprechit2D
209 
210  }//end if hit in Strips
211  else{
212  const SiPixelRecHit* pixelhit= dynamic_cast<const SiPixelRecHit*>(hit);
213  if(pixelhit!=0){
214  SiPixelClusterRefNew pixclust(pixelhit->cluster());
215  inval = OverlapMap[pixclust];
216  //cout<<"Taken the Pixel Cluster with ProdId "<<pixclust.id() <<"; the Value in the map is "<<inval<<" (DetId is "<<hit->geographicalId().rawId()<<")"<<endl;
217  }
218  else{
219  edm::LogError("AlignmentStats")<<"ERROR in <AlignmentStats::analyze>: Dynamic cast of Pixel RecHit failed! TypeId of the RecHit: "<<className(*hit);
220  }
221  }//end else hit is in Pixel
222 
223 
224  bool isOverlapHit(inval.isOverlap());
225 
226  if( isOverlapHit ){
227  //cout<<"This hit is an overlap !"<<endl;
228  DetHitMap::iterator overlapiter;
229  overlapiter=overlapmap_.find(rawId);
230 
231  if(overlapiter!=overlapmap_.end() ){//the det already collected at least an overlap, increase its value by one
232  overlapmap_[rawId]=overlapmap_[rawId]+1;
233  }
234  else{//first overlap on det unit, let's add it to the map
235  overlapmap_.insert(pair<uint32_t, uint32_t>(rawId, 1));
236  }
237  }//end if the hit is an overlap
238 
239 
240 
241 
242  int subdethit= static_cast<int>(hit->geographicalId().subdetId());
243  // if(ntracks>1)std::cout<<"Hit in SubDet="<<subdethit<<std::endl;
244  Nhits[trk_cnt][subdethit]=Nhits[trk_cnt][subdethit]+1;
245  nhit++;
246  }//end loop on trackingrechits
247  trk_cnt++;
248 
249  }//end loop on tracks
250 
251  // cout<<"Total number of pixel hits is "<<npxbhits<<endl;
252 
253  tmpPresc_--;
254  if(tmpPresc_<1){
255  outtree_->Fill();
257  }
258  if(trk_cnt!=ntracks)edm::LogError("AlignmentStats")<<"\nERROR! trk_cnt="<<trk_cnt<<" ntracks="<<ntracks;
259  trk_cnt=0;
260 
261  return;
262 }
RunNumber_t run() const
Definition: EventID.h:42
ClusterRef cluster() const
float Eta[MAXTRKS_]
type
Definition: HCALResponse.h:22
EventNumber_t event() const
Definition: EventID.h:44
uint32_t prescale_
DetHitMap hitmap_
edm::InputTag src_
DetHitMap overlapmap_
float Chi2n[MAXTRKS_]
uint32_t rawId() const
get the raw id
Definition: DetId.h:45
float P[MAXTRKS_]
uint32_t tmpPresc_
int j
Definition: DBlmapReader.cc:9
ClusterRef cluster() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:39
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
int k[5][pyjets_maxn]
Definition: DetId.h:20
const TrackerGeometry * trackerGeometry_
ClusterRef cluster() const
Definition: SiPixelRecHit.h:41
const T & get() const
Definition: EventSetup.h:55
bool isValid() const
static const int MAXTRKS_
unsigned int ntracks
edm::EventID id() const
Definition: EventBase.h:56
int Nhits[MAXTRKS_][7]
float Pt[MAXTRKS_]
DetId geographicalId() const
edm::InputTag overlapAM_
std::string className(const T &t)
Definition: ClassName.h:30
Our base class.
Definition: SiPixelRecHit.h:22
void AlignmentStats::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 53 of file AlignmentStats.cc.

References Chi2n, Eta, event_, firstEvent_, Nhits, ntracks, outtree_, P, prescale_, Pt, run_, statsTreeName_, tmpPresc_, and treefile_.

53  {// const edm::EventSetup &iSetup
54 
55  //book track stats tree
56  treefile_=new TFile(statsTreeName_.c_str(),"RECREATE");
57  treefile_->cd();
58  outtree_=new TTree("AlignmentTrackStats","Statistics of Tracks used for Alignment");
59  // int nHitsinPXB[MAXTRKS_], nHitsinPXE[MAXTRKS_], nHitsinTEC[MAXTRKS_], nHitsinTIB[MAXTRKS_],nHitsinTOB[MAXTRKS_],nHitsinTID[MAXTRKS_];
60 
61 
62  outtree_->Branch("Ntracks" ,&ntracks ,"Ntracks/i");
63  outtree_->Branch("Run_" ,&run_ ,"Run_Nr/I");
64  outtree_->Branch("Event" ,&event_ ,"EventNr/I");
65  outtree_->Branch("Eta" ,&Eta ,"Eta[Ntracks]/F");
66  outtree_->Branch("Phi" ,&Phi ,"Phi[Ntracks]/F");
67  outtree_->Branch("P" ,&P ,"P[Ntracks]/F");
68  outtree_->Branch("Pt" ,&Pt ,"Pt[Ntracks]/F");
69  outtree_->Branch("Chi2n" ,&Chi2n ,"Chi2n[Ntracks]/F");
70  outtree_->Branch("Nhits" ,&Nhits ,"Nhits[Ntracks][7]/I");
71  /*
72  outtree_->Branch("NhitsPXB" , ,);
73  outtree_->Branch("NhitsPXE" , ,);
74  outtree_->Branch("NhitsTIB" , ,);
75  outtree_->Branch("NhitsTID" , ,);
76  outtree_->Branch("NhitsTOB" , ,);
77  outtree_->Branch("NhitsTOB" , ,);
78  */
79 
81  firstEvent_=true;
82 
83  //load the tracker geometry from the EventSetup
84  // iSetup.get<TrackerDigiGeometryRecord>().get(trackerGeometry_);
85 
86 }//end beginJob
float Eta[MAXTRKS_]
uint32_t prescale_
float Chi2n[MAXTRKS_]
float P[MAXTRKS_]
uint32_t tmpPresc_
std::string statsTreeName_
unsigned int ntracks
int Nhits[MAXTRKS_][7]
float Pt[MAXTRKS_]
void AlignmentStats::endJob ( void  )
virtual

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_, errorMatrix2Lands_multiChannel::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().

264  {
265 
266  treefile_->cd();
267  edm::LogInfo("AlignmentStats")<<"Writing out the TrackStatistics in "<<gDirectory->GetPath()<<std::endl;
268  outtree_->Write();
269  delete outtree_;
270 
271  //create tree with hit maps (hitstree)
272  //book track stats tree
273  TFile *hitsfile=new TFile(hitsTreeName_.c_str(),"RECREATE");
274  hitsfile->cd();
275  TTree *hitstree=new TTree("AlignmentHitMap","Maps of Hits used for Alignment");
276 
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);
280  int subdet=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");
296 
297  /*
298  TTree *overlapstree=new TTree("OverlapHitMap","Maps of Overlaps used for Alignment");
299  hitstree->Branch("DetId", &id , "DetId/i");
300  hitstree->Branch("NOverlaps", &nhits , "Nhits/i");
301  hitstree->Branch("SubDet", &subdet, "SubDet/I");
302  hitstree->Branch("Layer", &layer, "Layer/i");
303  hitstree->Branch("is2D" , &is2D, "is2D/B");
304  hitstree->Branch("isStereo",&isStereo,"isStereo/B");
305  hitstree->Branch("posX", &posX, "posX/F");
306  hitstree->Branch("posY", &posY, "posY/F");
307  hitstree->Branch("posZ", &posZ, "posZ/F");
308  hitstree->Branch("posR", &posR, "posR/F");
309  hitstree->Branch("posEta", &posEta, "posEta/F");
310  hitstree->Branch("posPhi", &posPhi, "posPhi/F");
311  */
312 
313 
314  AlignableTracker* theAliTracker=new AlignableTracker(&(*trackerGeometry_));
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;
318 
319  for(int det_cnt=0;det_cnt< ndetunits;++det_cnt){
320 
321  //re-initialize for safety
322  id=0;
323  nhits=0;
324  noverlaps=0;
325  posX=-99999.0;
326  posY=-77777.0;
327  posZ=-88888.0;
328  posEta=-6666.0;
329  posPhi=-5555.0;
330  posR=-4444.0;
331  subdet=0;
332  layer=0;
333  is2D=false;
334  isStereo=false;
335 
336  //if detunit in vector is found also in the map, look for how many hits were collected
337  //and save in the tree this number
338  id=static_cast <uint32_t>( Detunitslist[det_cnt]->id() );
339  if( hitmap_.find(id) != hitmap_.end() ){
340  nhits=hitmap_[id];
341  }
342  //if not, save nhits=0
343  else{
344  nhits=0;
345  hitmap_.insert(pair<uint32_t, uint32_t>(id, 0));
346  }
347 
348  if( overlapmap_.find(id) != overlapmap_.end() ){
349  noverlaps=overlapmap_[id];
350  }
351  //if not, save nhits=0
352  else{
353  noverlaps=0;
354  overlapmap_.insert(pair<uint32_t, uint32_t>(id, 0));
355  }
356 
357  //take other geometrical infos from the det
358  posX= Detunitslist[det_cnt]->globalPosition().x();
359  posY= Detunitslist[det_cnt]->globalPosition().y();
360  posZ= Detunitslist[det_cnt]->globalPosition().z();
361 
362  align::GlobalVector vec(posX,posY,posZ);
363  posR = vec.perp();
364  posPhi = vec.phi();
365  posEta = vec.eta();
366  // posPhi = atan2(posY,posX);
367 
368  DetId detid(id);
369  subdet=detid.subdetId();
370 
371  //get layers, petals, etc...
372  if(subdet==PixelSubdetector::PixelBarrel){//PXB
373  PXBDetId pxbdet=(id);
374  layer=pxbdet.layer();
375  is2D=true;
376  isStereo=false;
377  }
378  else if(subdet==PixelSubdetector::PixelEndcap){
379  PXFDetId pxfdet(id);
380  layer=pxfdet.disk();
381  is2D=true;
382  isStereo=false;
383  }
384  else if(subdet==SiStripDetId::TIB){
385  TIBDetId tibdet(id);
386  layer=tibdet.layerNumber();
387  is2D=tibdet.isDoubleSide();
388  isStereo=tibdet.isStereo();
389  }
390  else if(subdet==SiStripDetId::TID){
391  TIDDetId tiddet(id);
392  layer=tiddet.diskNumber();
393  is2D=tiddet.isDoubleSide();
394  isStereo=tiddet.isStereo();
395  }
396  else if(subdet==SiStripDetId::TOB){
397  TOBDetId tobdet(id);
398  layer=tobdet.layerNumber();
399  is2D=tobdet.isDoubleSide();
400  isStereo=tobdet.isStereo();
401  }
402  else if(subdet==SiStripDetId::TEC){
403  TECDetId tecdet(id);
404  layer=tecdet.wheelNumber();
405  is2D=tecdet.isDoubleSide();
406  isStereo=tecdet.isStereo();
407  }
408  else{
409  edm::LogError("AlignmentStats")<<"Detector not belonging neither to pixels nor to strips! Skipping it. SubDet= "<<subdet;
410  }
411 
412  //write in the hitstree
413  hitstree->Fill();
414  }//end loop over detunits
415 
416 
417  //save hitstree
418  hitstree->Write();
419  delete hitstree;
420  //delete Detunitslist;
421  hitmap_.clear();
422  overlapmap_.clear();
423  delete hitsfile;
424 }
DetHitMap hitmap_
DetHitMap overlapmap_
unsigned int layer() const
layer id
Definition: PXBDetId.h:35
Definition: DetId.h:20
const TrackerGeometry * trackerGeometry_
const Alignables & deepComponents() const
Definition: Alignable.h:71
std::string hitsTreeName_

Member Data Documentation

float AlignmentStats::Chi2n[MAXTRKS_]
private

Definition at line 56 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

float AlignmentStats::Eta[MAXTRKS_]
private

Definition at line 56 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

int AlignmentStats::event_
private

Definition at line 54 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

bool AlignmentStats::firstEvent_
private

Definition at line 48 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

DetHitMap AlignmentStats::hitmap_
private

Definition at line 61 of file AlignmentStats.h.

Referenced by analyze(), and endJob().

std::string AlignmentStats::hitsTreeName_
private

Definition at line 44 of file AlignmentStats.h.

Referenced by endJob().

bool AlignmentStats::keepHitPopulation_
private

Definition at line 42 of file AlignmentStats.h.

bool AlignmentStats::keepTrackStats_
private

Definition at line 41 of file AlignmentStats.h.

const int AlignmentStats::MAXTRKS_ =200
staticprivate

Definition at line 53 of file AlignmentStats.h.

Referenced by analyze().

int AlignmentStats::Nhits[MAXTRKS_][7]
private

Definition at line 57 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

unsigned int AlignmentStats::ntracks
private

Definition at line 55 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

TTree* AlignmentStats::outtree_
private

Definition at line 52 of file AlignmentStats.h.

Referenced by AlignmentStats(), analyze(), beginJob(), and endJob().

edm::InputTag AlignmentStats::overlapAM_
private

Definition at line 40 of file AlignmentStats.h.

Referenced by analyze().

DetHitMap AlignmentStats::overlapmap_
private

Definition at line 62 of file AlignmentStats.h.

Referenced by analyze(), and endJob().

float AlignmentStats::P[MAXTRKS_]
private

Definition at line 56 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

float AlignmentStats::Phi[MAXTRKS_]
private

Definition at line 56 of file AlignmentStats.h.

uint32_t AlignmentStats::prescale_
private

Definition at line 45 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

float AlignmentStats::Pt[MAXTRKS_]
private

Definition at line 56 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

int AlignmentStats::run_
private

Definition at line 54 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

edm::InputTag AlignmentStats::src_
private

Definition at line 39 of file AlignmentStats.h.

Referenced by analyze().

std::string AlignmentStats::statsTreeName_
private

Definition at line 43 of file AlignmentStats.h.

Referenced by beginJob().

uint32_t AlignmentStats::tmpPresc_
private

Definition at line 47 of file AlignmentStats.h.

Referenced by analyze(), and beginJob().

const TrackerGeometry* AlignmentStats::trackerGeometry_
private

Definition at line 65 of file AlignmentStats.h.

Referenced by analyze(), and endJob().

TFile* AlignmentStats::treefile_
private

Definition at line 51 of file AlignmentStats.h.

Referenced by beginJob(), and endJob().