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 Member Functions | Private Attributes
TrackerTreeGenerator Class Reference

#include <Alignment/TrackerAlignment/plugins/TrackerTreeGenerator.cc>

Inheritance diagram for TrackerTreeGenerator:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 TrackerTreeGenerator (const edm::ParameterSet &)
 
 ~TrackerTreeGenerator ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
virtual void endJob ()
 

Private Attributes

const bool createEntryForDoubleSidedModule_
 
edm::ParameterSet theParameterSet
 
std::vector< TrackerTreeVariablesvTkTreeVar_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 74 of file TrackerTreeGenerator.cc.

Constructor & Destructor Documentation

TrackerTreeGenerator::TrackerTreeGenerator ( const edm::ParameterSet iConfig)
explicit

Definition at line 103 of file TrackerTreeGenerator.cc.

103  :
104 createEntryForDoubleSidedModule_(iConfig.getParameter<bool>("createEntryForDoubleSidedModule")),
105 theParameterSet( iConfig )
106 {
107 }
T getParameter(std::string const &) const
edm::ParameterSet theParameterSet
const bool createEntryForDoubleSidedModule_
TrackerTreeGenerator::~TrackerTreeGenerator ( )

Definition at line 110 of file TrackerTreeGenerator.cc.

111 {
112 }

Member Function Documentation

void TrackerTreeGenerator::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 121 of file TrackerTreeGenerator.cc.

References PV3DBase< T, PVType, FrameType >::barePhi(), TrackerTreeVariables::blade, PXFDetId::blade(), TrackerTreeVariables::bladeAl, TrackerGeomBuilderFromGeometricDet::build(), createEntryForDoubleSidedModule_, SiPixelRawToDigiRegional_cfi::deltaPhi, TrackerGeometry::detIds(), TrackerGeometry::detUnitIds(), PXFDetId::disk(), dPhi(), PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi::dR, PV3DBase< T, PVType, FrameType >::eta(), edm::EventSetup::get(), TrackerTreeVariables::half, TrackerGeometry::idToDet(), TrackerTreeVariables::isDoubleSide, TOBDetId::isDoubleSide(), TIBDetId::isDoubleSide(), TIDDetId::isDoubleSide(), TECDetId::isDoubleSide(), TrackerTreeVariables::isRPhi, TOBDetId::isRPhi(), TIBDetId::isRPhi(), TIDDetId::isRPhi(), TECDetId::isRPhi(), PXBDetId::ladder(), TrackerTreeVariables::layer, PXBDetId::layer(), TOBDetId::layer(), TIBDetId::layer(), TrackerTreeVariables::module, PXBDetId::module(), PXFDetId::module(), TOBDetId::module(), TIBDetId::module(), TIDDetId::module(), TECDetId::module(), TrackerTreeVariables::nStrips, StripTopology::nstrips(), TrackerTreeVariables::outerInner, TrackerTreeVariables::panel, PXFDetId::panel(), PV3DBase< T, PVType, FrameType >::perp(), TrackerTreeVariables::petal, TECDetId::petal(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, TrackerTreeVariables::posEta, TrackerTreeVariables::posPhi, TrackerTreeVariables::posR, TrackerTreeVariables::posX, TrackerTreeVariables::posY, TrackerTreeVariables::posZ, edm::ESHandle< class >::product(), TrackerTreeVariables::rawId, DetId::rawId(), TrackerTreeVariables::ring, TIDDetId::ring(), TECDetId::ring(), TrackerTreeVariables::rod, TOBDetId::rod(), TrackerTreeVariables::rodAl, TrackerTreeVariables::side, PXFDetId::side(), TIDDetId::side(), TECDetId::side(), StripGeomDetUnit::specificTopology(), TIBDetId::string(), TrackerTreeVariables::subdetId, DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Surface::toGlobal(), TrackerTreeVariables::uDirection, TrackerTreeVariables::vDirection, vTkTreeVar_, TrackerTreeVariables::wDirection, TIDDetId::wheel(), TECDetId::wheel(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

122 {
123  //iSetup.get<TrackerDigiGeometryRecord>().get(tkGeom);
124  // now try to take directly the ideal geometry independent of used geometry in Global Tag
125  edm::ESHandle<GeometricDet> geometricDet;
126  iSetup.get<IdealGeometryRecord>().get(geometricDet);
127 
128  //Retrieve tracker topology from geometry
129  edm::ESHandle<TrackerTopology> tTopoHandle;
130  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
131  const TrackerTopology* const tTopo = tTopoHandle.product();
132 
134  iSetup.get<PTrackerParametersRcd>().get(ptp);
135  TrackerGeomBuilderFromGeometricDet trackerBuilder;
136  TrackerGeometry* tkGeom = trackerBuilder.build(&(*geometricDet), *ptp, tTopo);
137 
138  const TrackerGeometry *bareTkGeomPtr = &(*tkGeom);
139 
140  edm::LogInfo("TrackerTreeGenerator") //<< "@SUB=analyze"
141  << "There are " << bareTkGeomPtr->detIds().size()
142  << " dets and "<<bareTkGeomPtr->detUnitIds().size()
143  <<" detUnits in the Geometry Record";
144 
145  if(createEntryForDoubleSidedModule_)edm::LogInfo("TrackerTreeGenerator") << "Create entry for each module AND one entry for virtual "
146  << "double-sided module in addition";
147  else edm::LogInfo("TrackerTreeGenerator") << "Create one entry for each physical module, do NOT create additional entry for virtual "
148  << "double-sided module";
149 
150  const TrackingGeometry::DetIdContainer& detIdContainer = bareTkGeomPtr->detIds();
151 
152  std::vector<DetId>::const_iterator iDet;
153  for(iDet = detIdContainer.begin(); iDet != detIdContainer.end(); ++iDet){
154 
155  const DetId& detId = *iDet;
156  const GeomDet& geomDet = *tkGeom->idToDet(*(&detId));
157  const Surface& surface = (&geomDet)->surface();
158 
159  TrackerTreeVariables tkTreeVar;
160  uint32_t rawId = detId.rawId();
161  tkTreeVar.rawId = rawId;
162  tkTreeVar.subdetId = detId.subdetId();
163 
164  if(tkTreeVar.subdetId == PixelSubdetector::PixelBarrel){
165  PXBDetId pxbId(rawId);
166  unsigned int whichHalfBarrel(1), ladderAl(0); //DetId does not know about halfBarrels is PXB ...
167  if( (rawId>=302056964 && rawId<302059300) || (rawId>=302123268 && rawId<302127140) || (rawId>=302189572 && rawId<302194980) )whichHalfBarrel=2;
168  tkTreeVar.layer = pxbId.layer();
169  tkTreeVar.half = whichHalfBarrel;
170  tkTreeVar.rod = pxbId.ladder(); // ... so, ladder is not per halfBarrel-Layer, but per barrel-layer!
171  tkTreeVar.module = pxbId.module();
172  if(tkTreeVar.layer==1){
173  if(tkTreeVar.half==2)ladderAl = tkTreeVar.rod -5;
174  else if(tkTreeVar.rod>15)ladderAl = tkTreeVar.rod -10;
175  else ladderAl = tkTreeVar.rod;
176  }else if(tkTreeVar.layer==2){
177  if(tkTreeVar.half==2)ladderAl = tkTreeVar.rod -8;
178  else if(tkTreeVar.rod>24)ladderAl = tkTreeVar.rod -16;
179  else ladderAl = tkTreeVar.rod;
180  }else if(tkTreeVar.layer==3){
181  if(tkTreeVar.half==2)ladderAl = tkTreeVar.rod -11;
182  else if(tkTreeVar.rod>33)ladderAl = tkTreeVar.rod -22;
183  else ladderAl = tkTreeVar.rod;
184  }
185  tkTreeVar.rodAl = ladderAl;}
186  else if(tkTreeVar.subdetId == PixelSubdetector::PixelEndcap){
187  PXFDetId pxfId(rawId);
188  unsigned int whichHalfCylinder(1), bladeAl(0); //DetId does not kmow about halfCylinders in PXF
189  if( (rawId>=352394500 && rawId<352406032) || (rawId>=352460036 && rawId<352471568) || (rawId>=344005892 && rawId<344017424) || (rawId>=344071428 && rawId<344082960) )whichHalfCylinder=2;
190  tkTreeVar.layer = pxfId.disk();
191  tkTreeVar.side = pxfId.side();
192  tkTreeVar.half = whichHalfCylinder;
193  tkTreeVar.blade = pxfId.blade();
194  tkTreeVar.panel = pxfId.panel();
195  tkTreeVar.module = pxfId.module();
196  if(tkTreeVar.half==2)bladeAl = tkTreeVar.blade -6;
197  else if(tkTreeVar.blade>18)bladeAl = tkTreeVar.blade -12;
198  else bladeAl = tkTreeVar.blade;
199  tkTreeVar.bladeAl = bladeAl;}
200  else if(tkTreeVar.subdetId == StripSubdetector::TIB){
201  TIBDetId tibId(rawId);
202  unsigned int whichHalfShell(1), stringAl(0); //DetId does not kmow about halfShells in TIB
203  if( (rawId>=369120484 && rawId<369120688) || (rawId>=369121540 && rawId<369121776) || (rawId>=369136932 && rawId<369137200) || (rawId>=369137988 && rawId<369138288) ||
204  (rawId>=369153396 && rawId<369153744) || (rawId>=369154436 && rawId<369154800) || (rawId>=369169844 && rawId<369170256) || (rawId>=369170900 && rawId<369171344) ||
205  (rawId>=369124580 && rawId<369124784) || (rawId>=369125636 && rawId<369125872) || (rawId>=369141028 && rawId<369141296) || (rawId>=369142084 && rawId<369142384) ||
206  (rawId>=369157492 && rawId<369157840) || (rawId>=369158532 && rawId<369158896) || (rawId>=369173940 && rawId<369174352) || (rawId>=369174996 && rawId<369175440) ) whichHalfShell=2;
207  tkTreeVar.layer = tibId.layer();
208  tkTreeVar.side = tibId.string()[0];
209  tkTreeVar.half = whichHalfShell;
210  tkTreeVar.rod = tibId.string()[2];
211  tkTreeVar.outerInner = tibId.string()[1];
212  tkTreeVar.module = tibId.module();
213  tkTreeVar.isDoubleSide = tibId.isDoubleSide();
214  tkTreeVar.isRPhi = tibId.isRPhi();
215  if(tkTreeVar.half==2){
216  if(tkTreeVar.layer==1){
217  if(tkTreeVar.outerInner==1)stringAl = tkTreeVar.rod -13;
218  else if(tkTreeVar.outerInner==2)stringAl = tkTreeVar.rod -15;
219  }
220  if(tkTreeVar.layer==2){
221  if(tkTreeVar.outerInner==1)stringAl = tkTreeVar.rod -17;
222  else if(tkTreeVar.outerInner==2)stringAl = tkTreeVar.rod -19;
223  }
224  if(tkTreeVar.layer==3){
225  if(tkTreeVar.outerInner==1)stringAl = tkTreeVar.rod -22;
226  else if(tkTreeVar.outerInner==2)stringAl = tkTreeVar.rod -23;
227  }
228  if(tkTreeVar.layer==4){
229  if(tkTreeVar.outerInner==1)stringAl = tkTreeVar.rod -26;
230  else if(tkTreeVar.outerInner==2)stringAl = tkTreeVar.rod -28;
231  }
232  }
233  else stringAl = tkTreeVar.rod;
234  tkTreeVar.rodAl = stringAl;}
235  else if(tkTreeVar.subdetId == StripSubdetector::TID){
236  TIDDetId tidId(rawId);
237  tkTreeVar.layer = tidId.wheel();
238  tkTreeVar.side = tidId.side();
239  tkTreeVar.ring = tidId.ring();
240  tkTreeVar.outerInner = tidId.module()[0];
241  tkTreeVar.module = tidId.module()[1];
242  tkTreeVar.isDoubleSide = tidId.isDoubleSide();
243  tkTreeVar.isRPhi = tidId.isRPhi();}
244  else if(tkTreeVar.subdetId == StripSubdetector::TOB){
245  TOBDetId tobId(rawId);
246  tkTreeVar.layer = tobId.layer();
247  tkTreeVar.side = tobId.rod()[0];
248  tkTreeVar.rod = tobId.rod()[1];
249  tkTreeVar.module = tobId.module();
250  tkTreeVar.isDoubleSide = tobId.isDoubleSide();
251  tkTreeVar.isRPhi = tobId.isRPhi();}
252  else if(tkTreeVar.subdetId == StripSubdetector::TEC){
253  TECDetId tecId(rawId);
254  tkTreeVar.layer = tecId.wheel();
255  tkTreeVar.side = tecId.side();
256  tkTreeVar.ring = tecId.ring();
257  tkTreeVar.petal = tecId.petal()[1];
258  tkTreeVar.outerInner = tecId.petal()[0];
259  tkTreeVar.module = tecId.module();
260  tkTreeVar.isDoubleSide = tecId.isDoubleSide();
261  tkTreeVar.isRPhi = tecId.isRPhi();}
262 
263 
264  LocalPoint lPModule(0.,0.,0.), lUDirection(1.,0.,0.), lVDirection(0.,1.,0.), lWDirection(0.,0.,1.);
265  GlobalPoint gPModule = surface.toGlobal(lPModule),
266  gUDirection = surface.toGlobal(lUDirection),
267  gVDirection = surface.toGlobal(lVDirection),
268  gWDirection = surface.toGlobal(lWDirection);
269  double dR(999.), dPhi(999.), dZ(999.);
271  || tkTreeVar.subdetId==StripSubdetector::TOB){
272  dR = gWDirection.perp() - gPModule.perp();
273  dPhi = deltaPhi(gUDirection.barePhi(),gPModule.barePhi());
274  dZ = gVDirection.z() - gPModule.z();
275  tkTreeVar.uDirection = dPhi>0. ? 1 : -1;
276  tkTreeVar.vDirection = dZ>0. ? 1 : -1;
277  tkTreeVar.wDirection = dR>0. ? 1 : -1;
278  }else if(tkTreeVar.subdetId==PixelSubdetector::PixelEndcap){
279  dR = gUDirection.perp() - gPModule.perp();
280  dPhi = deltaPhi(gVDirection.barePhi(),gPModule.barePhi());
281  dZ = gWDirection.z() - gPModule.z();
282  tkTreeVar.uDirection = dR>0. ? 1 : -1;
283  tkTreeVar.vDirection = dPhi>0. ? 1 : -1;
284  tkTreeVar.wDirection = dZ>0. ? 1 : -1;
285  }else if(tkTreeVar.subdetId==StripSubdetector::TID || tkTreeVar.subdetId==StripSubdetector::TEC){
286  dR = gVDirection.perp() - gPModule.perp();
287  dPhi = deltaPhi(gUDirection.barePhi(),gPModule.barePhi());
288  dZ = gWDirection.z() - gPModule.z();
289  tkTreeVar.uDirection = dPhi>0. ? 1 : -1;
290  tkTreeVar.vDirection = dR>0. ? 1 : -1;
291  tkTreeVar.wDirection = dZ>0. ? 1 : -1;
292  }
293  tkTreeVar.posR = gPModule.perp();
294  tkTreeVar.posPhi = gPModule.barePhi(); // = gPModule.barePhi().degrees();
295  tkTreeVar.posEta = gPModule.eta();
296  tkTreeVar.posX = gPModule.x();
297  tkTreeVar.posY = gPModule.y();
298  tkTreeVar.posZ = gPModule.z();
299 
300 
301  if(dynamic_cast<const StripGeomDetUnit*>(&geomDet)){ //is it a single physical module?
302  const StripGeomDetUnit& StripgeomDetUnit = dynamic_cast<const StripGeomDetUnit&>(geomDet);
303  if(tkTreeVar.subdetId==StripSubdetector::TIB || tkTreeVar.subdetId==StripSubdetector::TOB ||
305  const StripTopology& topol = dynamic_cast<const StripTopology&>(StripgeomDetUnit.specificTopology());
306  tkTreeVar.nStrips = topol.nstrips();
307  }
308  }
309 
310 
311  if(!createEntryForDoubleSidedModule_){if(tkTreeVar.isDoubleSide==1)continue;} // do so only for individual modules and not also one entry for the combined doubleSided Module
312  vTkTreeVar_.push_back(tkTreeVar);
313  }
314 
315 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
virtual int nstrips() const =0
T perp() const
Definition: PV3DBase.h:72
T y() const
Definition: PV3DBase.h:63
TrackerGeometry * build(const GeometricDet *gd, const PTrackerParameters &ptp, const TrackerTopology *tTopo)
virtual const StripTopology & specificTopology() const
Returns a reference to the strip proxy topology.
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
T barePhi() const
Definition: PV3DBase.h:68
const DetIdContainer & detUnitIds() const
Returm a vector of all GeomDetUnit DetIds.
double dPhi(double phi1, double phi2)
Definition: JetUtil.h:30
T z() const
Definition: PV3DBase.h:64
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
Definition: DetId.h:18
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
T eta() const
Definition: PV3DBase.h:76
const DetIdContainer & detIds() const
Returm a vector of all GeomDet DetIds (including those of GeomDetUnits)
const bool createEntryForDoubleSidedModule_
std::vector< TrackerTreeVariables > vTkTreeVar_
T x() const
Definition: PV3DBase.h:62
const TrackerGeomDet * idToDet(DetId) const
std::vector< DetId > DetIdContainer
void TrackerTreeGenerator::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 320 of file TrackerTreeGenerator.cc.

321 {
322 }
void TrackerTreeGenerator::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 327 of file TrackerTreeGenerator.cc.

References F(), fileService, TFileDirectory::make(), TFileService::mkdir(), python.rootplot.argparse::module, module::module(), relativeConstraints::ring, and vTkTreeVar_.

Referenced by o2o.O2ORunMgr::executeJob().

327  {
328  UInt_t rawId(999), subdetId(999), layer(999), side(999), half(999), rod(999), ring(999), petal(999),
329  blade(999), panel(999), outerInner(999), module(999), rodAl(999), bladeAl(999), nStrips(999);
330  Bool_t isDoubleSide(false), isRPhi(false);
331  Int_t uDirection(999), vDirection(999), wDirection(999);
332  Float_t posR(999.F), posPhi(999.F), posEta(999.F), posX(999.F), posY(999.F), posZ(999.F);
334  TFileDirectory treeDir = fileService->mkdir("TrackerTree");
335  TTree* trackerTree;
336  trackerTree = treeDir.make<TTree>("TrackerTree","IDs of all modules (ideal geometry)");
337  trackerTree->Branch("RawId", &rawId, "RawId/i");
338  trackerTree->Branch("SubdetId", &subdetId, "SubdetId/i");
339  trackerTree->Branch("Layer", &layer, "Layer/i"); // Barrel: Layer, Forward: Disk
340  trackerTree->Branch("Side", &side, "Side/i"); // Rod/Ring in +z or -z
341  trackerTree->Branch("Half", &half, "Half/i"); // PXB: HalfBarrel, PXF: HalfCylinder, TIB: HalfShell
342  trackerTree->Branch("Rod", &rod, "Rod/i"); // Barrel (Ladder or String or Rod)
343  trackerTree->Branch("Ring", &ring, "Ring/i"); // Forward
344  trackerTree->Branch("Petal", &petal, "Petal/i"); // TEC
345  trackerTree->Branch("Blade", &blade, "Blade/i"); // PXF
346  trackerTree->Branch("Panel", &panel, "Panel/i"); // PXF
347  trackerTree->Branch("OuterInner", &outerInner, "OuterInner/i"); // front/back String,Ring,Petal
348  trackerTree->Branch("Module", &module, "Module/i"); // Module ID
349  trackerTree->Branch("RodAl", &rodAl, "RodAl/i"); // Different for AlignmentHierarchy from TrackerHierarchy (TPB, TIB)
350  trackerTree->Branch("BladeAl", &bladeAl, "BladeAl/i"); // Different for AlignmentHierarchy from TrackerHierarchy (TPF)
351  trackerTree->Branch("NStrips", &nStrips, "NStrips/i");
352  trackerTree->Branch("IsDoubleSide", &isDoubleSide, "IsDoubleSide/O");
353  trackerTree->Branch("IsRPhi", &isRPhi, "IsRPhi/O");
354  trackerTree->Branch("UDirection", &uDirection, "UDirection/I");
355  trackerTree->Branch("VDirection", &vDirection, "VDirection/I");
356  trackerTree->Branch("WDirection", &wDirection, "WDirection/I");
357  trackerTree->Branch("PosR", &posR, "PosR/F");
358  trackerTree->Branch("PosPhi", &posPhi, "PosPhi/F");
359  trackerTree->Branch("PosEta", &posEta, "PosEta/F");
360  trackerTree->Branch("PosX", &posX, "PosX/F");
361  trackerTree->Branch("PosY", &posY, "PosY/F");
362  trackerTree->Branch("PosZ", &posZ, "PosZ/F");
363 
364  for(std::vector<TrackerTreeVariables>::const_iterator iTree = vTkTreeVar_.begin(); iTree != vTkTreeVar_.end(); ++iTree){
365  rawId = (*iTree).rawId;
366  subdetId = (*iTree).subdetId;
367  layer = (*iTree).layer;
368  side = (*iTree).side;
369  half = (*iTree).half;
370  rod = (*iTree).rod;
371  ring = (*iTree).ring;
372  petal = (*iTree).petal;
373  blade = (*iTree).blade;
374  panel = (*iTree).panel;
375  outerInner = (*iTree).outerInner;
376  module = (*iTree).module;
377  rodAl = (*iTree).rodAl;
378  bladeAl = (*iTree).bladeAl;
379  nStrips = (*iTree).nStrips;
380  isDoubleSide = (*iTree).isDoubleSide;
381  isRPhi = (*iTree).isRPhi;
382  uDirection = (*iTree).uDirection;
383  vDirection = (*iTree).vDirection;
384  wDirection = (*iTree).wDirection;
385  posR = (*iTree).posR;
386  posPhi = (*iTree).posPhi;
387  posEta = (*iTree).posEta;
388  posX = (*iTree).posX;
389  posY = (*iTree).posY;
390  posZ = (*iTree).posZ;
391 
392  trackerTree->Fill();
393  }
394  edm::LogInfo("TrackerTreeGenerator") << "TrackerTree contains "<< vTkTreeVar_.size() <<" entries overall";
395 }
module()
Definition: vlib.cc:994
T * make(const Args &...args) const
make new ROOT object
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
edm::Service< TFileService > fileService
std::vector< TrackerTreeVariables > vTkTreeVar_
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
Definition: vlib.h:208

Member Data Documentation

const bool TrackerTreeGenerator::createEntryForDoubleSidedModule_
private

Definition at line 87 of file TrackerTreeGenerator.cc.

Referenced by analyze().

edm::ParameterSet TrackerTreeGenerator::theParameterSet
private

Definition at line 89 of file TrackerTreeGenerator.cc.

std::vector<TrackerTreeVariables> TrackerTreeGenerator::vTkTreeVar_
private

Definition at line 88 of file TrackerTreeGenerator.cc.

Referenced by analyze(), and endJob().