CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
EcalHitMaker Class Reference

#include <EcalHitMaker.h>

Inheritance diagram for EcalHitMaker:
CaloHitMaker

Public Types

typedef ROOT::Math::Plane3D Plane3D
 
typedef math::XYZVector XYZNormal
 
typedef math::XYZVector XYZPoint
 
typedef math::XYZVector XYZVector
 
- Public Types inherited from CaloHitMaker
typedef ROOT::Math::Plane3D Plane3D
 
typedef math::XYZVector XYZPoint
 
typedef math::XYZVector XYZVector
 

Public Member Functions

bool addHit (double r, double phi, unsigned layer=0) override
 
bool addHitDepth (double r, double phi, double depth=-1)
 
const XYZPointecalEntrance () const
 used in FamosHcalHitMaker More...
 
double ecalHcalGapTotalL0 () const
 ECAL-HCAL transition. More...
 
double ecalHcalGapTotalX0 () const
 ECAL-HCAL transition. More...
 
 EcalHitMaker (CaloGeometryHelper *calo, const XYZPoint &ecalentrance, const DetId &cell, int onEcal, unsigned size, unsigned showertype, const RandomEngineAndDistribution *engine)
 
double ecalTotalL0 () const
 in the ECAL More...
 
double ecalTotalX0 () const
 in the ECAL More...
 
unsigned fastInsideCell (const CLHEP::Hep2Vector &point, double &sp, bool debug=false)
 
const std::vector< Crystal > & getCrystals () const
 for debugging More...
 
const FSimTrackgetFSimTrack () const
 To retrieve the track. More...
 
const std::map< CaloHitID, float > & getHits () override
 
bool getPads (double depth, bool inCm=false)
 
const std::vector< CaloSegment > & getSegments () const
 
double getX0back () const
 
double hcalTotalL0 () const
 in the HCAL More...
 
double hcalTotalX0 () const
 in the HCAL More...
 
double ps1TotalL0 () const
 total number of L0 in the PS (Layer1). More...
 
double ps1TotalX0 () const
 
double ps2eeTotalL0 () const
 
double ps2eeTotalX0 () const
 
double ps2TotalL0 () const
 total number of L0 in the PS (Layer2). More...
 
double ps2TotalX0 () const
 total number of X0 in the PS (Layer2). More...
 
void setCrackPadSurvivalProbability (double val)
 
void setPreshowerPresent (bool ps)
 
void setPulledPadSurvivalProbability (double val)
 
void setRadiusFactor (double r)
 
void setSpotEnergy (double e) override
 
void setTrackParameters (const XYZNormal &normal, double X0depthoffset, const FSimTrack &theTrack)
 
double totalL0 () const
 Number of interaction length "seen" by the track. More...
 
double totalX0 () const
 
double x0DepthOffset () const
 get the offset (e.g the number of X0 after which the shower starts) More...
 
 ~EcalHitMaker () override
 
- Public Member Functions inherited from CaloHitMaker
 CaloHitMaker (const CaloGeometryHelper *calo, DetId::Detector det, int subdetn, int cal, unsigned sht=0)
 
const CaloGeometryHelpergetCalorimeter () const
 
virtual ~CaloHitMaker ()
 

Private Types

typedef std::pair< CaloDirection, unsigned > neighbour
 

Private Member Functions

void buildGeometry ()
 
void buildSegments (const std::vector< CaloPoint > &cp)
 
void cellLine (std::vector< CaloPoint > &cp)
 
void configureGeometry ()
 
void convertIntegerCoordinates (double x, double y, unsigned &ix, unsigned &iy) const
 
CLHEP::Hep2Vector & correspondingEdge (neighbour &myneighbour, CaloDirection dir2)
 
void cracksPads (std::vector< neighbour > &cracks, unsigned iq)
 
bool diagonalEdge (unsigned myPad, CaloDirection dir, CLHEP::Hep2Vector &point)
 
void ecalCellLine (const XYZPoint &, const XYZPoint &, std::vector< CaloPoint > &cp)
 
void gapsLifting (std::vector< neighbour > &gaps, unsigned iq)
 
void hcalCellLine (std::vector< CaloPoint > &cp) const
 
bool inside3D (const std::vector< XYZPoint > &, const XYZPoint &p) const
 
void prepareCrystalNumberArray ()
 
void preshowerCellLine (std::vector< CaloPoint > &cp) const
 
bool pulled (const XYZPoint &origin, const XYZNormal &normal, XYZPoint &fPoint) const
 
void reorganizePads ()
 
bool unbalancedDirection (const std::vector< neighbour > &dirs, unsigned &unb, unsigned &dir1, unsigned &dir2)
 

Private Attributes

double bfactor_
 
std::vector< DetIdCellsWindow_
 
int central_
 
bool configuredGeometry_
 
std::vector< XYZPointcorners
 
double crackPadProbability_
 
std::vector< CrystalPadcrackpadsatdepth_
 
double currentdepth_
 
bool detailedShowerTail_
 
std::map< DetId, unsigned > DetIdMap_
 
bool doreorg_
 
XYZPoint EcalEntrance_
 
int ecalFirstSegment_
 
unsigned etasize_
 
bool hitmaphasbeencalculated_
 
std::vector< float > hits_
 
std::vector< CaloPointintersections_
 
double L0ECAL_
 
double L0EHGAP_
 
double L0HCAL_
 
double L0PS1_
 
double L0PS2_
 
double L0PS2EE_
 
double maxX0_
 
std::vector< CLHEP::Hep2Vector > mycorners
 
std::vector< std::vector< unsigned > > myCrystalNumberArray_
 
CrystalWindowMapmyCrystalWindowMap_
 
const FSimTrackmyTrack_
 
unsigned ncrackpadsatdepth_
 
unsigned ncrystals_
 
XYZNormal normal_
 
unsigned npadsatdepth_
 
unsigned nx_
 
unsigned ny_
 
int onEcal_
 
double outsideWindowEnergy_
 
std::vector< CrystalPadpadsatdepth_
 
unsigned phisize_
 
Crystal pivot_
 
Plane3D plan_
 
double pulledPadProbability_
 
double radiusCorrectionFactor_
 
double radiusFactor_
 
const RandomEngineAndDistributionrandom
 
double rearleakage_
 
std::vector< CrystalregionOfInterest_
 
std::vector< CaloSegmentsegments_
 
bool simulatePreshower_
 
double sizex_
 
double sizey_
 
double totalL0_
 
double totalX0_
 
bool truncatedGrid_
 
std::vector< bool > validPads_
 
double X0depthoffset_
 
double X0ECAL_
 
double X0EHGAP_
 
double X0HCAL_
 
double X0PS1_
 
double X0PS2_
 
double X0PS2EE_
 
double xmax_
 
double xmin_
 
double ymax_
 
double ymin_
 

Additional Inherited Members

- Static Protected Member Functions inherited from CaloHitMaker
static XYZPoint intersect (const Plane3D &p, const XYZPoint &a, const XYZPoint &b, double &t, bool segment, bool debug=false)
 
- Protected Attributes inherited from CaloHitMaker
bool EMSHOWER
 
bool HADSHOWER
 
std::map< CaloHitID, float > hitMap_
 
double interactionLength
 
bool MIP
 
double moliereRadius
 
const CaloGeometryHelpermyCalorimeter
 
unsigned showerType_
 
double spotEnergy
 
const CalorimeterPropertiestheCaloProperties
 

Detailed Description

Definition at line 24 of file EcalHitMaker.h.

Member Typedef Documentation

◆ neighbour

typedef std::pair<CaloDirection, unsigned> EcalHitMaker::neighbour
private

Definition at line 168 of file EcalHitMaker.h.

◆ Plane3D

typedef ROOT::Math::Plane3D EcalHitMaker::Plane3D

Definition at line 29 of file EcalHitMaker.h.

◆ XYZNormal

Definition at line 28 of file EcalHitMaker.h.

◆ XYZPoint

Definition at line 27 of file EcalHitMaker.h.

◆ XYZVector

Definition at line 26 of file EcalHitMaker.h.

Constructor & Destructor Documentation

◆ EcalHitMaker()

EcalHitMaker::EcalHitMaker ( CaloGeometryHelper calo,
const XYZPoint ecalentrance,
const DetId cell,
int  onEcal,
unsigned  size,
unsigned  showertype,
const RandomEngineAndDistribution engine 
)

Definition at line 33 of file EcalHitMaker.cc.

References bfactor_, CaloGeometryHelper::buildCrystal(), buildGeometry(), CellsWindow_, central_, corners, gather_cfg::cout, doreorg_, EcalEntrance_, ecalFirstSegment_, etasize_, CaloGeometryHelper::getClosestCell(), Crystal::getDetId(), Calorimeter::getEcalEndcapGeometry(), CaloSubdetectorGeometry::getGeometry(), CaloGeometryHelper::getWindow(), hitmaphasbeencalculated_, Histos::instance(), L0ECAL_, L0EHGAP_, L0HCAL_, L0PS1_, L0PS2_, L0PS2EE_, maxX0_, CaloHitMaker::myCalorimeter, mycorners, myCrystalWindowMap_, ncrystals_, outsideWindowEnergy_, phisize_, pivot_, pulledPadProbability_, rearleakage_, simulatePreshower_, findQualityFiles::size, totalL0_, totalX0_, truncatedGrid_, X0depthoffset_, X0ECAL_, X0EHGAP_, X0HCAL_, X0PS1_, X0PS2_, and X0PS2EE_.

40  : CaloHitMaker(theCalo, DetId::Ecal, ((onEcal == 1) ? EcalBarrel : EcalEndcap), onEcal, showertype),
41  EcalEntrance_(ecalentrance),
42  onEcal_(onEcal),
43  myTrack_(nullptr),
44  random(engine) {
45 #ifdef FAMOSDEBUG
46  myHistos = Histos::instance();
47 #endif
48  // myHistos->debug("Constructeur EcalHitMaker");
49  simulatePreshower_ = true;
50  X0depthoffset_ = 0.;
51  X0PS1_ = 0.;
52  X0PS2_ = 0.;
53  X0PS2EE_ = 0.;
54  X0ECAL_ = 0.;
55  X0EHGAP_ = 0.;
56  X0HCAL_ = 0.;
57  L0PS1_ = 0.;
58  L0PS2_ = 0.;
59  L0PS2EE_ = 0.;
60  L0ECAL_ = 0.;
61  L0EHGAP_ = 0.;
62  L0HCAL_ = 0.;
63  maxX0_ = 0.;
64  totalX0_ = 0;
65  totalL0_ = 0.;
68  rearleakage_ = 0.;
69  bfactor_ = 1.;
70  ncrystals_ = 0;
71 
72  doreorg_ = !showertype;
73 
75 
76  if (onEcal)
78  else
79  pivot_ = Crystal();
80  central_ = onEcal == 1;
81  ecalFirstSegment_ = -1;
82 
83  myCrystalWindowMap_ = nullptr;
84  // In some cases, a "dummy" grid, not based on a cell, can be built. The previous variables
85  // should however be initialized. In such a case onEcal=0
86  if (!onEcal)
87  return;
88 
89  // Same size in eta-phi
90  etasize_ = size;
91  phisize_ = size;
92 
93  // Build the grid
94  // The result is put in CellsWindow and is ordered by distance to the pivot
96 
97  buildGeometry();
98  // std::cout << " Geometry built " << regionOfInterest_.size() << std::endl;
99 
101 
102  // A local vector of corners
103  mycorners.resize(4);
104  corners.resize(4);
105 
106 #ifdef DEBUGGW
107  myHistos->fill("h10", EcalEntrance_.eta(), CellsWindow_.size());
108  if (onEcal == 2) {
109  myHistos->fill("h20", EcalEntrance_.perp(), CellsWindow_.size());
110  if (EcalEntrance_.perp() > 70 && EcalEntrance_.perp() < 80 && CellsWindow_.size() < 35) {
111  std::cout << " Truncated grid " << CellsWindow_.size() << " " << EcalEntrance_.perp() << std::endl;
112  std::cout << " Pivot "
113  << myCalorimeter->getEcalEndcapGeometry()->getGeometry(pivot_.getDetId())->getPosition().perp();
114  std::cout << EEDetId(pivot_.getDetId()) << std::endl;
115 
116  std::cout << " Test getClosestCell " << EcalEntrance_ << std::endl;
117  DetId testcell = myCalorimeter->getClosestCell(EcalEntrance_, true, false);
118  std::cout << " Result " << EEDetId(testcell) << std::endl;
119  std::cout << " Position " << myCalorimeter->getEcalEndcapGeometry()->getGeometry(testcell)->getPosition()
120  << std::endl;
121  }
122  }
123 
124 #endif
125 }
size
Write out results.
const DetId & getDetId() const
get the DetId
Definition: Crystal.h:46
double pulledPadProbability_
Definition: EcalHitMaker.h:264
void buildCrystal(const DetId &id, Crystal &) const
CrystalWindowMap * myCrystalWindowMap_
Definition: EcalHitMaker.h:233
DetId getClosestCell(const XYZPoint &point, bool ecal, bool central) const
void getWindow(const DetId &pivot, int s1, int s2, std::vector< DetId > &) const
double L0HCAL_
Definition: EcalHitMaker.h:204
std::vector< CLHEP::Hep2Vector > mycorners
Definition: EcalHitMaker.h:287
const RandomEngineAndDistribution * random
Definition: EcalHitMaker.h:290
const EcalEndcapGeometry * getEcalEndcapGeometry() const
Definition: Calorimeter.h:52
bool simulatePreshower_
Definition: EcalHitMaker.h:256
unsigned ncrystals_
Definition: EcalHitMaker.h:219
double X0HCAL_
Definition: EcalHitMaker.h:199
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
unsigned etasize_
Definition: EcalHitMaker.h:239
bool truncatedGrid_
Definition: EcalHitMaker.h:242
double L0PS2EE_
Definition: EcalHitMaker.h:202
double L0ECAL_
Definition: EcalHitMaker.h:203
double X0EHGAP_
Definition: EcalHitMaker.h:198
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
static Histos * instance()
Definition: Histos.cc:15
double totalL0_
Definition: EcalHitMaker.h:192
double L0EHGAP_
Definition: EcalHitMaker.h:205
unsigned phisize_
Definition: EcalHitMaker.h:240
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
double outsideWindowEnergy_
Definition: EcalHitMaker.h:209
Definition: DetId.h:17
std::vector< XYZPoint > corners
Definition: EcalHitMaker.h:288
double X0PS2EE_
Definition: EcalHitMaker.h:196
double bfactor_
Definition: EcalHitMaker.h:254
Crystal pivot_
Definition: EcalHitMaker.h:212
XYZPoint EcalEntrance_
Definition: EcalHitMaker.h:213
double X0ECAL_
Definition: EcalHitMaker.h:197
int ecalFirstSegment_
Definition: EcalHitMaker.h:236
void buildGeometry()
double X0depthoffset_
Definition: EcalHitMaker.h:193
std::vector< DetId > CellsWindow_
Definition: EcalHitMaker.h:224
bool hitmaphasbeencalculated_
Definition: EcalHitMaker.h:284
double rearleakage_
Definition: EcalHitMaker.h:208
CaloHitMaker(const CaloGeometryHelper *calo, DetId::Detector det, int subdetn, int cal, unsigned sht=0)
Definition: CaloHitMaker.cc:12
double totalX0_
Definition: EcalHitMaker.h:191

◆ ~EcalHitMaker()

EcalHitMaker::~EcalHitMaker ( )
override

Definition at line 127 of file EcalHitMaker.cc.

References myCrystalWindowMap_.

127  {
128  if (myCrystalWindowMap_ != nullptr) {
129  delete myCrystalWindowMap_;
130  }
131 }
CrystalWindowMap * myCrystalWindowMap_
Definition: EcalHitMaker.h:233

Member Function Documentation

◆ addHit()

bool EcalHitMaker::addHit ( double  r,
double  phi,
unsigned  layer = 0 
)
overridevirtual

Implements CaloHitMaker.

Definition at line 184 of file EcalHitMaker.cc.

References funct::cos(), fastInsideCell(), RandomEngineAndDistribution::flatShoot(), hits_, outsideWindowEnergy_, phi, point, alignCSCRings::r, radiusFactor_, random, funct::sin(), and CaloHitMaker::spotEnergy.

Referenced by HFShower::compute(), HDShower::compute(), EMShower::compute(), and HDRShower::setHit().

184  {
185  // std::cout <<" Addhit " << std::endl;
186  // std::cout << " Before insideCell " << std::endl;
187  double sp(1.);
188  // std::cout << " Trying to add " << r << " " << phi << " " << radiusFactor_ << std::endl;
189  r *= radiusFactor_;
190  CLHEP::Hep2Vector point(r * std::cos(phi), r * std::sin(phi));
191  // std::cout << "point " << point << std::endl;
192  // CellID cellid=insideCell(point,sp);
193  unsigned xtal = fastInsideCell(point, sp);
194  // if(cellid.isZero()) std::cout << " cell is Zero " << std::endl;
195  if (xtal < 1000) {
196  if (sp == 1.)
197  hits_[xtal] += spotEnergy;
198  else
199  hits_[xtal] += (random->flatShoot() < sp) * spotEnergy;
200  return true;
201  }
202 
204  // std::cout << " This hit ; r= " << point << " hasn't been added "<<std::endl;
205  // std::cout << " Xtal " << xtal << std::endl;
206  // for(unsigned ip=0;ip<npadsatdepth_;++ip)
207  // {
208  // std::cout << padsatdepth_[ip] << std::endl;
209  // }
210 
211  return false;
212 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
const RandomEngineAndDistribution * random
Definition: EcalHitMaker.h:290
unsigned fastInsideCell(const CLHEP::Hep2Vector &point, double &sp, bool debug=false)
double radiusFactor_
Definition: EcalHitMaker.h:248
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double outsideWindowEnergy_
Definition: EcalHitMaker.h:209
std::vector< float > hits_
Definition: EcalHitMaker.h:226
double flatShoot(double xmin=0.0, double xmax=1.0) const
double spotEnergy
Definition: CaloHitMaker.h:48
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ addHitDepth()

bool EcalHitMaker::addHitDepth ( double  r,
double  phi,
double  depth = -1 
)

Definition at line 133 of file EcalHitMaker.cc.

References funct::cos(), hcalRecHitTable_cff::depth, fastInsideCell(), hits_, outsideWindowEnergy_, phi, point, alignCSCRings::r, radiusFactor_, rearleakage_, regionOfInterest_, funct::sin(), CaloHitMaker::spotEnergy, and X0depthoffset_.

Referenced by EMShower::compute().

133  {
134  // std::cout << " Add hit depth called; Current deph is " << currentdepth_;
135  // std::cout << " Required depth is " << depth << std::endl;
137  double sp(1.);
138  r *= radiusFactor_;
139  CLHEP::Hep2Vector point(r * std::cos(phi), r * std::sin(phi));
140 
141  unsigned xtal = fastInsideCell(point, sp);
142  // if(cellid.isZero()) std::cout << " cell is Zero " << std::endl;
143  // if(xtal<1000)
144  // {
145  // std::cout << "Result " << regionOfInterest_[xtal].getX0Back() << " " ;
146  // std::cout << depth << std::endl;
147  // }
148  // myHistos->fill("h5000",depth);
149  if (xtal < 1000) {
150  // myHistos->fill("h5002",regionOfInterest_[xtal].getX0Back(),depth);
151  // myHistos->fill("h5003",ecalentrance_.eta(),maxX0_);
152  if (regionOfInterest_[xtal].getX0Back() > depth) {
153  hits_[xtal] += spotEnergy;
154  // myHistos->fill("h5005",r);
155  return true;
156  } else {
158  }
159  } else {
160  // std::cout << " Return false " << std::endl;
161  // std::cout << " Add hit depth called; Current deph is " << currentdepth_;
162  // std::cout << " Required depth is " << depth << std::endl;
163  // std::cout << " R = " << r << " " << radiusFactor_ << std::endl;
164  }
165 
167  return false;
168 }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
unsigned fastInsideCell(const CLHEP::Hep2Vector &point, double &sp, bool debug=false)
double radiusFactor_
Definition: EcalHitMaker.h:248
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
double outsideWindowEnergy_
Definition: EcalHitMaker.h:209
std::vector< float > hits_
Definition: EcalHitMaker.h:226
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
double X0depthoffset_
Definition: EcalHitMaker.h:193
double rearleakage_
Definition: EcalHitMaker.h:208
double spotEnergy
Definition: CaloHitMaker.h:48
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ buildGeometry()

void EcalHitMaker::buildGeometry ( )
private

Definition at line 790 of file EcalHitMaker.cc.

References CaloGeometryHelper::buildCrystal(), CellsWindow_, configuredGeometry_, DetIdMap_, relativeConstraints::empty, hits_, CaloHitMaker::myCalorimeter, myCrystalNumberArray_, myCrystalWindowMap_, ncrystals_, nx_, ny_, padsatdepth_, phisize_, regionOfInterest_, and validPads_.

Referenced by EcalHitMaker().

790  {
791  configuredGeometry_ = false;
792  ncrystals_ = CellsWindow_.size();
793  // create the vector with of pads with the appropriate size
794  padsatdepth_.resize(ncrystals_);
795 
796  // This is fully correct in the barrel.
797  ny_ = phisize_;
798  nx_ = ncrystals_ / ny_;
799  std::vector<unsigned> empty;
800  empty.resize(ny_, 0);
801  myCrystalNumberArray_.reserve((unsigned)nx_);
802  for (unsigned inx = 0; inx < (unsigned)nx_; ++inx) {
803  myCrystalNumberArray_.push_back(empty);
804  }
805 
806  hits_.resize(ncrystals_, 0.);
807  regionOfInterest_.clear();
809  validPads_.resize(ncrystals_);
810  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
812  regionOfInterest_[ic].setNumber(ic);
813  DetIdMap_.insert(std::pair<DetId, unsigned>(CellsWindow_[ic], ic));
814  }
815 
816  // Computes the map of the neighbours
818 }
void buildCrystal(const DetId &id, Crystal &) const
unsigned ny_
Definition: EcalHitMaker.h:221
CrystalWindowMap * myCrystalWindowMap_
Definition: EcalHitMaker.h:233
std::map< DetId, unsigned > DetIdMap_
Definition: EcalHitMaker.h:231
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
unsigned ncrystals_
Definition: EcalHitMaker.h:219
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
bool configuredGeometry_
Definition: EcalHitMaker.h:218
unsigned phisize_
Definition: EcalHitMaker.h:240
std::vector< std::vector< unsigned > > myCrystalNumberArray_
Definition: EcalHitMaker.h:188
std::vector< float > hits_
Definition: EcalHitMaker.h:226
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
std::vector< DetId > CellsWindow_
Definition: EcalHitMaker.h:224
unsigned nx_
Definition: EcalHitMaker.h:221

◆ buildSegments()

void EcalHitMaker::buildSegments ( const std::vector< CaloPoint > &  cp)
private

Definition at line 583 of file EcalHitMaker.cc.

References CaloGeometryHelper::borderCrossing(), hgcalTopologyTester_cfi::cell2, gather_cfg::cout, CaloSegment::CRACK, DetId::Ecal, EcalBarrel, EcalEndcap, EcalEntrance_, ecalFirstSegment_, CaloSegment::ECALHCALGAP, EcalPreshower, CaloSegment::GAP, CaloSegment::HCAL, DetId::Hcal, L0ECAL_, L0EHGAP_, L0HCAL_, CaloSegment::L0length(), L0PS1_, L0PS2_, L0PS2EE_, CaloSegment::length(), CaloHitMaker::myCalorimeter, myTrack_, CaloSegment::PbWO4, FSimVertex::position(), CaloSegment::PS, CaloSegment::PSEEGAP, alignCSCRings::s, segments_, findQualityFiles::size, totalL0_, totalX0_, FSimTrack::vertex(), X0ECAL_, X0EHGAP_, X0HCAL_, CaloSegment::X0length(), X0PS1_, X0PS2_, and X0PS2EE_.

Referenced by setTrackParameters().

583  {
584  // myHistos->debug();
585  // TimeMe theT("FamosGrid::buildSegments");
586  unsigned size = cp.size();
587  if (size % 2 != 0) {
588  // std::cout << " There is a problem " << std::endl;
589  return;
590  }
591  // myHistos->debug();
592  unsigned nsegments = size / 2;
593  segments_.reserve(nsegments);
594  if (size == 0)
595  return;
596  // curv abs
597  double s = 0.;
598  double sX0 = 0.;
599  double sL0 = 0.;
600 
601 #ifdef DEBUGCELLLINE
602  unsigned ncrossedxtals = 0;
603 #endif
604  unsigned is = 0;
605  while (is < nsegments) {
606  if (cp[2 * is].getDetId() != cp[2 * is + 1].getDetId() && cp[2 * is].whichDetector() != DetId::Hcal &&
607  cp[2 * is + 1].whichDetector() != DetId::Hcal) {
608  // std::cout << " Problem with the segments " << std::endl;
609  // std::cout << cp[2*is].whichDetector() << " " << cp[2*is+1].whichDetector() << std::endl;
610  // std::cout << is << " " <<cp[2*is].getDetId().rawId() << std::endl;
611  // std::cout << (2*is+1) << " " <<cp[2*is+1].getDetId().rawId() << std::endl;
612  ++is;
613  continue;
614  }
615 
616  // Check if it is a Preshower segment - Layer 1
617  // One segment per layer, nothing between
618  // myHistos->debug("Just avant Preshower");
619  if (cp[2 * is].whichDetector() == DetId::Ecal && cp[2 * is].whichSubDetector() == EcalPreshower &&
620  cp[2 * is].whichLayer() == 1) {
621  if (cp[2 * is + 1].whichDetector() == DetId::Ecal && cp[2 * is + 1].whichSubDetector() == EcalPreshower &&
622  cp[2 * is + 1].whichLayer() == 1) {
623  CaloSegment preshsegment(cp[2 * is], cp[2 * is + 1], s, sX0, sL0, CaloSegment::PS, myCalorimeter);
624  segments_.push_back(preshsegment);
625  // std::cout << " Added (1-1)" << preshsegment << std::endl;
626  s += preshsegment.length();
627  sX0 += preshsegment.X0length();
628  sL0 += preshsegment.L0length();
629  X0PS1_ += preshsegment.X0length();
630  L0PS1_ += preshsegment.L0length();
631  } else {
632  std::cout << " Strange segment between Preshower1 and " << cp[2 * is + 1].whichDetector();
633  std::cout << std::endl;
634  }
635  ++is;
636  continue;
637  }
638 
639  // Check if it is a Preshower segment - Layer 2
640  // One segment per layer, nothing between
641  if (cp[2 * is].whichDetector() == DetId::Ecal && cp[2 * is].whichSubDetector() == EcalPreshower &&
642  cp[2 * is].whichLayer() == 2) {
643  if (cp[2 * is + 1].whichDetector() == DetId::Ecal && cp[2 * is + 1].whichSubDetector() == EcalPreshower &&
644  cp[2 * is + 1].whichLayer() == 2) {
645  CaloSegment preshsegment(cp[2 * is], cp[2 * is + 1], s, sX0, sL0, CaloSegment::PS, myCalorimeter);
646  segments_.push_back(preshsegment);
647  // std::cout << " Added (1-2)" << preshsegment << std::endl;
648  s += preshsegment.length();
649  sX0 += preshsegment.X0length();
650  sL0 += preshsegment.L0length();
651  X0PS2_ += preshsegment.X0length();
652  L0PS2_ += preshsegment.L0length();
653 
654  // material between preshower and EE
655  if (is < (nsegments - 1) && cp[2 * is + 2].whichDetector() == DetId::Ecal &&
656  cp[2 * is + 2].whichSubDetector() == EcalEndcap) {
657  CaloSegment gapsef(cp[2 * is + 1], cp[2 * is + 2], s, sX0, sL0, CaloSegment::PSEEGAP, myCalorimeter);
658  segments_.push_back(gapsef);
659  s += gapsef.length();
660  sX0 += gapsef.X0length();
661  sL0 += gapsef.L0length();
662  X0PS2EE_ += gapsef.X0length();
663  L0PS2EE_ += gapsef.L0length();
664  // std::cout << " Created a segment " << gapsef.length()<< " " << gapsef.X0length()<< std::endl;
665  }
666  } else {
667  std::cout << " Strange segment between Preshower2 and " << cp[2 * is + 1].whichDetector();
668  std::cout << std::endl;
669  }
670  ++is;
671  continue;
672  }
673  // Now deal with the ECAL
674  // One segment in each crystal. Segment corresponding to cracks/gaps are added
675  // myHistos->debug("Just avant ECAL");
676  if (cp[2 * is].whichDetector() == DetId::Ecal &&
677  (cp[2 * is].whichSubDetector() == EcalBarrel || cp[2 * is].whichSubDetector() == EcalEndcap)) {
678  if (cp[2 * is + 1].whichDetector() == DetId::Ecal &&
679  (cp[2 * is + 1].whichSubDetector() == EcalBarrel || cp[2 * is + 1].whichSubDetector() == EcalEndcap)) {
680  DetId cell2 = cp[2 * is + 1].getDetId();
681  // set the real entrance
682  if (ecalFirstSegment_ < 0)
683  ecalFirstSegment_ = segments_.size();
684 
685  // !! Approximatiom : the first segment is always in a crystal
686  if (cp[2 * is].getDetId() == cell2) {
687  CaloSegment segment(cp[2 * is], cp[2 * is + 1], s, sX0, sL0, CaloSegment::PbWO4, myCalorimeter);
688  segments_.push_back(segment);
689  // std::cout << " Added (2)" << segment << std::endl;
690  s += segment.length();
691  sX0 += segment.X0length();
692  sL0 += segment.L0length();
693  X0ECAL_ += segment.X0length();
694  L0ECAL_ += segment.L0length();
695 #ifdef DEBUGCELLLINE
696  ++ncrossedxtals;
697 #endif
698  ++is;
699  } else {
700  std::cout << " One more bug in the segment " << std::endl;
701  ++is;
702  }
703  // Now check if a gap or crack should be added
704  if (is > 0 && is < nsegments) {
705  DetId cell3 = cp[2 * is].getDetId();
706  if (cp[2 * is].whichDetector() != DetId::Hcal) {
707  // Crack inside the ECAL
708  bool bordercrossing = myCalorimeter->borderCrossing(cell2, cell3);
709  CaloSegment cracksegment(cp[2 * is - 1],
710  cp[2 * is],
711  s,
712  sX0,
713  sL0,
714  (bordercrossing) ? CaloSegment::CRACK : CaloSegment::GAP,
715  myCalorimeter);
716  segments_.push_back(cracksegment);
717  s += cracksegment.length();
718  sX0 += cracksegment.X0length();
719  sL0 += cracksegment.L0length();
720  X0ECAL_ += cracksegment.X0length();
721  L0ECAL_ += cracksegment.L0length();
722  // std::cout <<" Added(3) "<< cracksegment << std::endl;
723  } else {
724  // a segment corresponding to ECAL/HCAL transition should be
725  // added here
726  CaloSegment cracksegment(cp[2 * is - 1], cp[2 * is], s, sX0, sL0, CaloSegment::ECALHCALGAP, myCalorimeter);
727  segments_.push_back(cracksegment);
728  s += cracksegment.length();
729  sX0 += cracksegment.X0length();
730  sL0 += cracksegment.L0length();
731  X0EHGAP_ += cracksegment.X0length();
732  L0EHGAP_ += cracksegment.L0length();
733  }
734  }
735  continue;
736  } else {
737  std::cout << " Strange segment between " << cp[2 * is].whichDetector();
738  std::cout << " and " << cp[2 * is + 1].whichDetector() << std::endl;
739  ++is;
740  continue;
741  }
742  }
743  // myHistos->debug("Just avant HCAL");
744  // HCAL
745  if (cp[2 * is].whichDetector() == DetId::Hcal && cp[2 * is + 1].whichDetector() == DetId::Hcal) {
746  CaloSegment segment(cp[2 * is], cp[2 * is + 1], s, sX0, sL0, CaloSegment::HCAL, myCalorimeter);
747  segments_.push_back(segment);
748  s += segment.length();
749  sX0 += segment.X0length();
750  sL0 += segment.L0length();
751  X0HCAL_ += segment.X0length();
752  L0HCAL_ += segment.L0length();
753  // std::cout <<" Added(4) "<< segment << std::endl;
754  ++is;
755  }
756  }
757  // std::cout << " PS1 " << X0PS1_ << " " << L0PS1_ << std::endl;
758  // std::cout << " PS2 " << X0PS2_ << " " << L0PS2_ << std::endl;
759  // std::cout << " ECAL " << X0ECAL_ << " " << L0ECAL_ << std::endl;
760  // std::cout << " HCAL " << X0HCAL_ << " " << L0HCAL_ << std::endl;
761 
764  // myHistos->debug("Just avant le fill");
765 
766 #ifdef DEBUGCELLLINE
767  myHistos->fill("h200", fabs(EcalEntrance_.eta()), X0ECAL_);
768  myHistos->fill("h210", EcalEntrance_.phi(), X0ECAL_);
769  if (X0ECAL_ < 20)
770  myHistos->fill("h212", EcalEntrance_.phi(), X0ECAL_);
771  // if(X0ECAL_<1.)
772  // {
773  // for(unsigned ii=0; ii<segments_.size() ; ++ii)
774  // {
775  // std::cout << segments_[ii] << std::endl;
776  // }
777  // }
778  myHistos->fillByNumber("h30", ncrossedxtals, EcalEntrance_.eta(), X0ECAL_);
779 
780  double zvertex = myTrack_->vertex().position().z();
781 
782  myHistos->fill("h310", EcalEntrance_.eta(), X0ECAL_);
783  if (X0ECAL_ < 22)
784  myHistos->fill("h410", EcalEntrance_.phi());
785  myHistos->fill("h400", zvertex, X0ECAL_);
786 #endif
787  // std::cout << " Finished the segments " << std::endl;
788 }
size
Write out results.
double L0HCAL_
Definition: EcalHitMaker.h:204
const FSimVertex vertex() const
Origin vertex.
double X0HCAL_
Definition: EcalHitMaker.h:199
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
double L0PS2EE_
Definition: EcalHitMaker.h:202
double L0ECAL_
Definition: EcalHitMaker.h:203
double X0EHGAP_
Definition: EcalHitMaker.h:198
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
double totalL0_
Definition: EcalHitMaker.h:192
double L0EHGAP_
Definition: EcalHitMaker.h:205
Definition: DetId.h:17
bool borderCrossing(const DetId &, const DetId &) const
double X0PS2EE_
Definition: EcalHitMaker.h:196
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:48
XYZPoint EcalEntrance_
Definition: EcalHitMaker.h:213
double X0ECAL_
Definition: EcalHitMaker.h:197
int ecalFirstSegment_
Definition: EcalHitMaker.h:236
double totalX0_
Definition: EcalHitMaker.h:191
std::vector< CaloSegment > segments_
Definition: EcalHitMaker.h:276

◆ cellLine()

void EcalHitMaker::cellLine ( std::vector< CaloPoint > &  cp)
private

Definition at line 369 of file EcalHitMaker.cc.

References central_, gather_cfg::cout, DeadROC_duringRun::dir, ecalCellLine(), FSimTrack::ecalEntrance(), EcalEntrance_, hcalCellLine(), FSimTrack::hcalEntrance(), FSimTrack::layer1Entrance(), FSimTrack::layer2Entrance(), myTrack_, normal_, FSimTrack::onEcal(), onEcal_, FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), FSimTrack::onVFcal(), FSimVertex::position(), preshowerCellLine(), simulatePreshower_, jetUpdater_cfi::sort, RawParticle::Vect(), bphysicsOniaDQM_cfi::vertex, FSimTrack::vertex(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by setTrackParameters().

369  {
370  cp.clear();
371  // if(myTrack->onVFcal()!=2)
372  // {
375  if (onEcal_)
377  // }
378 
379  XYZPoint vertex(myTrack_->vertex().position().Vect());
380 
381  //sort the points by distance (in the ECAL they are not necessarily ordered)
382  XYZVector dir(0., 0., 0.);
383  if (myTrack_->onLayer1()) {
384  vertex = (myTrack_->layer1Entrance().vertex()).Vect();
385  dir = myTrack_->layer1Entrance().Vect().Unit();
386  } else if (myTrack_->onLayer2()) {
387  vertex = (myTrack_->layer2Entrance().vertex()).Vect();
388  dir = myTrack_->layer2Entrance().Vect().Unit();
389  } else if (myTrack_->onEcal()) {
390  vertex = (myTrack_->ecalEntrance().vertex()).Vect();
391  dir = myTrack_->ecalEntrance().Vect().Unit();
392  } else if (myTrack_->onHcal()) {
393  vertex = (myTrack_->hcalEntrance().vertex()).Vect();
394  dir = myTrack_->hcalEntrance().Vect().Unit();
395  } else if (myTrack_->onVFcal() == 2) {
396  vertex = (myTrack_->vfcalEntrance().vertex()).Vect();
397  dir = myTrack_->vfcalEntrance().Vect().Unit();
398  } else {
399  std::cout << " Problem with the grid " << std::endl;
400  }
401 
402  // Move the vertex for distance comparison (5cm)
403  vertex -= 5. * dir;
405  sort(cp.begin(), cp.end(), myDistance);
406 
407  // The intersections with the HCAL shouldn't need to be sorted
408  // with the N.I it is actually a source of problems
409  hcalCellLine(cp);
410 
411  // std::cout << " Intersections ordered by distance to " << vertex << std::endl;
412  //
413  // for (unsigned ic=0;ic<cp.size();++ic)
414  // {
415  // XYZVector t=cp[ic]-vertex;
416  // std::cout << cp[ic] << " " << t.mag() << std::endl;
417  // }
418 }
XYZNormal normal_
Definition: EcalHitMaker.h:214
void ecalCellLine(const XYZPoint &, const XYZPoint &, std::vector< CaloPoint > &cp)
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:149
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
Definition: FSimTrack.h:140
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:143
int onHcal() const
Definition: FSimTrack.h:116
const FSimVertex vertex() const
Origin vertex.
bool simulatePreshower_
Definition: EcalHitMaker.h:256
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
int onLayer2() const
Definition: FSimTrack.h:106
int onLayer1() const
Definition: FSimTrack.h:101
int onVFcal() const
Definition: FSimTrack.h:121
int onEcal() const
Definition: FSimTrack.h:111
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
void preshowerCellLine(std::vector< CaloPoint > &cp) const
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:48
XYZPoint EcalEntrance_
Definition: EcalHitMaker.h:213
math::XYZVector XYZPoint
void hcalCellLine(std::vector< CaloPoint > &cp) const
math::XYZVector XYZVector
Definition: RawParticle.h:26
const RawParticle & layer1Entrance() const
The particle at Preshower Layer 1.
Definition: FSimTrack.h:137
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ configureGeometry()

void EcalHitMaker::configureGeometry ( )
private

Definition at line 1010 of file EcalHitMaker.cc.

References bfactor_, CaloGeometryHelper::borderCrossing(), configuredGeometry_, DetIdMap_, DeadROC_duringRun::dir, EcalEntrance_, M_PI, M_PI_2, CaloGeometryHelper::magneticField(), CaloGeometryHelper::move(), CaloHitMaker::myCalorimeter, ncrystals_, CaloDirectionOperations::neighbourDirection(), CaloDirectionOperations::oppositeDirection(), regionOfInterest_, mps_update::status, and theta().

Referenced by getPads().

1010  {
1011  configuredGeometry_ = true;
1012  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
1013  // std::cout << " Building " << cellids_[ic] << std::endl;
1014  for (unsigned idir = 0; idir < 8; ++idir) {
1015  unsigned oppdir = CaloDirectionOperations::oppositeDirection(idir);
1016  // Is there something else to do ?
1017  // The relationship with the neighbour may have been set previously.
1018  if (regionOfInterest_[ic].crystalNeighbour(idir).status() >= 0) {
1019  // std::cout << " Nothing to do " << std::endl;
1020  continue;
1021  }
1022 
1023  const DetId& oldcell(regionOfInterest_[ic].getDetId());
1025  DetId newcell(oldcell);
1026  if (!myCalorimeter->move(newcell, dir)) {
1027  // no neighbour in this direction
1028  regionOfInterest_[ic].crystalNeighbour(idir).setStatus(-1);
1029  continue;
1030  }
1031  // Determine the number of this neighbour
1032  // std::cout << " The neighbour is " << newcell << std::endl;
1033  std::map<DetId, unsigned>::const_iterator niter(DetIdMap_.find(newcell));
1034  if (niter == DetIdMap_.end()) {
1035  // std::cout << " The neighbour is not in the map " << std::endl;
1036  regionOfInterest_[ic].crystalNeighbour(idir).setStatus(-1);
1037  continue;
1038  }
1039  // Now there is a neighbour
1040  // std::cout << " The neighbour is " << niter->second << " " << cellids_[niter->second] << std::endl;
1041  regionOfInterest_[ic].crystalNeighbour(idir).setNumber(niter->second);
1042  // std::cout << " Managed to set crystalNeighbour " << ic << " " << idir << std::endl;
1043  // std::cout << " Trying " << niter->second << " " << oppdir << std::endl;
1044  regionOfInterest_[niter->second].crystalNeighbour(oppdir).setNumber(ic);
1045  // std::cout << " Crack/gap " << std::endl;
1046  if (myCalorimeter->borderCrossing(oldcell, newcell)) {
1047  regionOfInterest_[ic].crystalNeighbour(idir).setStatus(1);
1048  regionOfInterest_[niter->second].crystalNeighbour(oppdir).setStatus(1);
1049  // std::cout << " Crack ! " << std::endl;
1050  } else {
1051  regionOfInterest_[ic].crystalNeighbour(idir).setStatus(0);
1052  regionOfInterest_[niter->second].crystalNeighbour(oppdir).setStatus(0);
1053  // std::cout << " Gap" << std::endl;
1054  }
1055  }
1056  }
1057  // Magnetic field a la Charlot
1058  double theta = EcalEntrance_.theta();
1059  if (theta > M_PI_2)
1060  theta = M_PI - theta;
1061  bfactor_ = 1. / (1. + 0.133 * theta);
1062  if (myCalorimeter->magneticField() == 0.)
1063  bfactor_ = 1.;
1064 }
std::map< DetId, unsigned > DetIdMap_
Definition: EcalHitMaker.h:231
#define M_PI_2
static unsigned oppositeDirection(unsigned iside)
static unsigned neighbourDirection(const CaloDirection &side)
unsigned int -> Direction for the neighbours
unsigned ncrystals_
Definition: EcalHitMaker.h:219
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
bool configuredGeometry_
Definition: EcalHitMaker.h:218
bool move(DetId &cell, const CaloDirection &dir, bool fast=true) const
#define M_PI
Definition: DetId.h:17
bool borderCrossing(const DetId &, const DetId &) const
double bfactor_
Definition: EcalHitMaker.h:254
XYZPoint EcalEntrance_
Definition: EcalHitMaker.h:213
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
double magneticField() const
CaloDirection
Codes the local directions in the cell lattice.
Definition: CaloDirection.h:9
Geom::Theta< T > theta() const

◆ convertIntegerCoordinates()

void EcalHitMaker::convertIntegerCoordinates ( double  x,
double  y,
unsigned &  ix,
unsigned &  iy 
) const
private

Definition at line 1088 of file EcalHitMaker.cc.

References createfilelist::int, ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::ix(), ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::endcap::iy(), sizex_, sizey_, x, xmin_, y, and ymin_.

Referenced by fastInsideCell(), and prepareCrystalNumberArray().

1088  {
1089  int tix = (int)((x - xmin_) / sizex_);
1090  int tiy = (int)((y - ymin_) / sizey_);
1091  ix = iy = 9999;
1092  if (tix >= 0)
1093  ix = (unsigned)tix;
1094  if (tiy >= 0)
1095  iy = (unsigned)tiy;
1096 }
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t ix(uint32_t id)
ALPAKA_FN_ACC ALPAKA_FN_INLINE uint32_t iy(uint32_t id)

◆ correspondingEdge()

CLHEP::Hep2Vector & EcalHitMaker::correspondingEdge ( neighbour myneighbour,
CaloDirection  dir2 
)
private

Definition at line 1176 of file EcalHitMaker.cc.

References CaloDirectionOperations::add2d(), TCMET_cfi::corner, DeadROC_duringRun::dir, L1TDiffHarvesting_cfi::dir2, CaloDirectionOperations::oppositeSide(), and padsatdepth_.

Referenced by gapsLifting().

1176  {
1179  // std::cout << "Corresponding Edge " << dir<< " " << dir2 << " " << corner << std::endl;
1180  return padsatdepth_[myneighbour.second].edge(corner);
1181 }
static CaloDirection add2d(const CaloDirection &dir1, const CaloDirection &dir2)
static CaloDirection oppositeSide(const CaloDirection &side)
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
CaloDirection
Codes the local directions in the cell lattice.
Definition: CaloDirection.h:9

◆ cracksPads()

void EcalHitMaker::cracksPads ( std::vector< neighbour > &  cracks,
unsigned  iq 
)
private

Definition at line 1336 of file EcalHitMaker.cc.

References crackPadProbability_, crackpadsatdepth_, EAST, CrystalPad::edge(), dqmdumpme::first, mycorners, NORTH, NORTHEAST, NORTHWEST, padsatdepth_, CrystalPad::setSurvivalProbability(), SOUTH, SOUTHEAST, SOUTHWEST, and WEST.

Referenced by reorganizePads().

1336  {
1337  // std::cout << " myPad " << &myPad << std::endl;
1338  unsigned ncracks = cracks.size();
1339  CrystalPad& myPad = padsatdepth_[iq];
1340  for (unsigned ic = 0; ic < ncracks; ++ic) {
1341  // std::vector<CLHEP::Hep2Vector> mycorners;
1342  // mycorners.reserve(4);
1343  switch (cracks[ic].first) {
1344  case NORTH: {
1345  mycorners[0] = (padsatdepth_[cracks[ic].second].edge(SOUTHWEST));
1346  mycorners[1] = (padsatdepth_[cracks[ic].second].edge(SOUTHEAST));
1347  mycorners[2] = (myPad.edge(NORTHEAST));
1348  mycorners[3] = (myPad.edge(NORTHWEST));
1349  } break;
1350  case SOUTH: {
1351  mycorners[0] = (myPad.edge(SOUTHWEST));
1352  mycorners[1] = (myPad.edge(SOUTHEAST));
1353  mycorners[2] = (padsatdepth_[cracks[ic].second].edge(NORTHEAST));
1354  mycorners[3] = (padsatdepth_[cracks[ic].second].edge(NORTHWEST));
1355  } break;
1356  case EAST: {
1357  mycorners[0] = (myPad.edge(NORTHEAST));
1358  mycorners[1] = (padsatdepth_[cracks[ic].second].edge(NORTHWEST));
1359  mycorners[2] = (padsatdepth_[cracks[ic].second].edge(SOUTHWEST));
1360  mycorners[3] = (myPad.edge(SOUTHEAST));
1361  } break;
1362  case WEST: {
1363  mycorners[0] = (padsatdepth_[cracks[ic].second].edge(NORTHEAST));
1364  mycorners[1] = (myPad.edge(NORTHWEST));
1365  mycorners[2] = (myPad.edge(SOUTHWEST));
1366  mycorners[3] = (padsatdepth_[cracks[ic].second].edge(SOUTHEAST));
1367  } break;
1368  default: {
1369  }
1370  }
1371  CrystalPad crackpad(ic, mycorners);
1372  // to be tuned. A simpleconfigurable should be used
1373  crackpad.setSurvivalProbability(crackPadProbability_);
1374  crackpadsatdepth_.push_back(crackpad);
1375  }
1376  // std::cout << " Finished cracksPads " << std::endl;
1377 }
std::vector< CrystalPad > crackpadsatdepth_
Definition: EcalHitMaker.h:282
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
std::vector< CLHEP::Hep2Vector > mycorners
Definition: EcalHitMaker.h:287
CLHEP::Hep2Vector & edge(unsigned iside, int n)
access to the corners in direction iside; n=0,1
Definition: CrystalPad.cc:222
double crackPadProbability_
Definition: EcalHitMaker.h:266

◆ diagonalEdge()

bool EcalHitMaker::diagonalEdge ( unsigned  myPad,
CaloDirection  dir,
CLHEP::Hep2Vector &  point 
)
private

Definition at line 1183 of file EcalHitMaker.cc.

References DeadROC_duringRun::dir, CaloDirectionOperations::neighbourDirection(), CaloDirectionOperations::oppositeSide(), padsatdepth_, point, regionOfInterest_, mps_update::status, and validPads_.

Referenced by gapsLifting().

1183  {
1185  if (regionOfInterest_[myPad].crystalNeighbour(idir).status() < 0)
1186  return false;
1187  unsigned nneighbour = regionOfInterest_[myPad].crystalNeighbour(idir).number();
1188  if (!validPads_[nneighbour]) {
1189  // std::cout << " Wasn't able to move " << std::endl;
1190  return false;
1191  }
1193  return true;
1194 }
static CaloDirection oppositeSide(const CaloDirection &side)
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
static unsigned neighbourDirection(const CaloDirection &side)
unsigned int -> Direction for the neighbours
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5

◆ ecalCellLine()

void EcalHitMaker::ecalCellLine ( const XYZPoint a,
const XYZPoint b,
std::vector< CaloPoint > &  cp 
)
private

Definition at line 497 of file EcalHitMaker.cc.

References a, angle(), b, corners, DOWN, inside3D(), CaloHitMaker::intersect(), mag2(), ncrystals_, normal_, regionOfInterest_, CaloDirectionOperations::Side(), mathSSE::sqrt(), submitPVValidationJobs::t, funct::tan(), and UP.

Referenced by cellLine().

497  {
498  // std::vector<XYZPoint> corners;
499  // corners.resize(4);
500  unsigned ic = 0;
501  double t;
502  XYZPoint xp;
503  DetId c_entrance, c_exit;
504  bool entrancefound(false), exitfound(false);
505  // std::cout << " Look for intersections " << ncrystals_ << std::endl;
506  // std::cout << " regionOfInterest_ " << truncatedGrid_ << " " << regionOfInterest_.size() << std::endl;
507  // try to determine the number of crystals to test
508  // First determine the incident angle
509  double angle = std::acos(normal_.Dot(regionOfInterest_[0].getAxis().Unit()));
510 
511  // std::cout << " Normal " << normal_<< " Axis " << regionOfInterest_[0].getAxis().Unit() << std::endl;
512  double backdistance = std::sqrt(regionOfInterest_[0].getAxis().mag2()) * std::tan(angle);
513  // 1/2.2cm = 0.45
514  // std::cout << " Angle " << angle << std::endl;
515  // std::cout << " Back distance " << backdistance << std::endl;
516  unsigned ncrystals = (unsigned)(backdistance * 0.45);
517  unsigned highlim = (ncrystals + 4);
518  highlim *= highlim;
519  if (highlim > ncrystals_)
520  highlim = ncrystals_;
521  // unsigned lowlim=(ncrystals>2)? (ncrystals-2):0;
522  // std::cout << " Ncrys " << ncrystals << std::endl;
523 
524  while (ic < ncrystals_ && (ic < highlim || !exitfound)) {
525  // Check front side
526  // if(!entrancefound)
527  {
528  const Plane3D& plan = regionOfInterest_[ic].getFrontPlane();
529  // XYZVector axis1=(plan.Normal());
530  // XYZVector axis2=regionOfInterest_[ic].getFirstEdge();
531  xp = intersect(plan, a, b, t, false);
532  regionOfInterest_[ic].getFrontSide(corners);
533  // CrystalPad pad(9999,onEcal_,corners,regionOfInterest_[ic].getCorner(0),axis1,axis2);
534  // if(pad.globalinside(xp))
535  if (inside3D(corners, xp)) {
536  cp.push_back(CaloPoint(regionOfInterest_[ic].getDetId(), UP, xp));
537  entrancefound = true;
538  c_entrance = regionOfInterest_[ic].getDetId();
539  // myHistos->fill("j12",highlim,ic);
540  }
541  }
542 
543  // check rear side
544  // if(!exitfound)
545  {
546  const Plane3D& plan = regionOfInterest_[ic].getBackPlane();
547  // XYZVector axis1=(plan.Normal());
548  // XYZVector axis2=regionOfInterest_[ic].getFifthEdge();
549  xp = intersect(plan, a, b, t, false);
550  regionOfInterest_[ic].getBackSide(corners);
551  // CrystalPad pad(9999,onEcal_,corners,regionOfInterest_[ic].getCorner(4),axis1,axis2);
552  // if(pad.globalinside(xp))
553  if (inside3D(corners, xp)) {
554  cp.push_back(CaloPoint(regionOfInterest_[ic].getDetId(), DOWN, xp));
555  exitfound = true;
556  c_exit = regionOfInterest_[ic].getDetId();
557  // std::cout << " Crystal : " << ic << std::endl;
558  // myHistos->fill("j10",highlim,ic);
559  }
560  }
561 
562  if (entrancefound && exitfound && c_entrance == c_exit)
563  return;
564  // check lateral sides
565  for (unsigned iside = 0; iside < 4; ++iside) {
566  const Plane3D& plan = regionOfInterest_[ic].getLateralPlane(iside);
567  xp = intersect(plan, a, b, t, false);
568  // XYZVector axis1=(plan.Normal());
569  // XYZVector axis2=regionOfInterest_[ic].getLateralEdge(iside);
570  regionOfInterest_[ic].getLateralSide(iside, corners);
571  // CrystalPad pad(9999,onEcal_,corners,regionOfInterest_[ic].getCorner(iside),axis1,axis2);
572  // if(pad.globalinside(xp))
573  if (inside3D(corners, xp)) {
574  cp.push_back(CaloPoint(regionOfInterest_[ic].getDetId(), CaloDirectionOperations::Side(iside), xp));
575  // std::cout << cp[cp.size()-1] << std::endl;
576  }
577  }
578  // Go to next crystal
579  ++ic;
580  }
581 }
XYZNormal normal_
Definition: EcalHitMaker.h:214
unsigned ncrystals_
Definition: EcalHitMaker.h:219
bool inside3D(const std::vector< XYZPoint > &, const XYZPoint &p) const
T sqrt(T t)
Definition: SSEVec.h:23
Tan< T >::type tan(const T &t)
Definition: Tan.h:22
static XYZPoint intersect(const Plane3D &p, const XYZPoint &a, const XYZPoint &b, double &t, bool segment, bool debug=false)
Definition: CaloHitMaker.cc:41
static CaloDirection Side(unsigned i)
unsigned int -> Side conversion
Definition: DetId.h:17
std::vector< XYZPoint > corners
Definition: EcalHitMaker.h:288
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
double b
Definition: hdecay.h:120
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
math::XYZVector XYZPoint
double a
Definition: hdecay.h:121
ROOT::Math::Plane3D Plane3D
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11

◆ ecalEntrance()

const XYZPoint& EcalHitMaker::ecalEntrance ( ) const
inline

used in FamosHcalHitMaker

Definition at line 123 of file EcalHitMaker.h.

References EcalEntrance_.

Referenced by HcalHitMaker::HcalHitMaker().

123 { return EcalEntrance_; };
XYZPoint EcalEntrance_
Definition: EcalHitMaker.h:213

◆ ecalHcalGapTotalL0()

double EcalHitMaker::ecalHcalGapTotalL0 ( ) const
inline

ECAL-HCAL transition.

Definition at line 91 of file EcalHitMaker.h.

References L0EHGAP_.

Referenced by HDRShower::computeShower(), HDShower::HDShower(), and HFShower::HFShower().

91 { return L0EHGAP_; }
double L0EHGAP_
Definition: EcalHitMaker.h:205

◆ ecalHcalGapTotalX0()

double EcalHitMaker::ecalHcalGapTotalX0 ( ) const
inline

ECAL-HCAL transition.

Definition at line 70 of file EcalHitMaker.h.

References X0EHGAP_.

Referenced by HDShower::HDShower(), and HFShower::HFShower().

70 { return X0EHGAP_; }
double X0EHGAP_
Definition: EcalHitMaker.h:198

◆ ecalTotalL0()

double EcalHitMaker::ecalTotalL0 ( ) const
inline

in the ECAL

Definition at line 85 of file EcalHitMaker.h.

References L0ECAL_.

Referenced by HDRShower::computeShower(), HDShower::HDShower(), and HFShower::HFShower().

85 { return L0ECAL_; }
double L0ECAL_
Definition: EcalHitMaker.h:203

◆ ecalTotalX0()

double EcalHitMaker::ecalTotalX0 ( ) const
inline

in the ECAL

Definition at line 67 of file EcalHitMaker.h.

References X0ECAL_.

Referenced by EMShower::prepareSteps(), and setTrackParameters().

67 { return X0ECAL_; }
double X0ECAL_
Definition: EcalHitMaker.h:197

◆ fastInsideCell()

unsigned EcalHitMaker::fastInsideCell ( const CLHEP::Hep2Vector &  point,
double &  sp,
bool  debug = false 
)

Definition at line 229 of file EcalHitMaker.cc.

References convertIntegerCoordinates(), gather_cfg::cout, crackpadsatdepth_, d1, debug, newFWLiteAna::found, CrystalWindowMap::getCrystalWindow(), myCrystalNumberArray_, myCrystalWindowMap_, ncrackpadsatdepth_, nx_, ny_, padsatdepth_, point, findQualityFiles::size, mps_update::status, and validPads_.

Referenced by addHit(), and addHitDepth().

229  {
230  // debug = true;
231  bool found = false;
232  // something clever has to be implemented here
233  unsigned d1, d2;
234  convertIntegerCoordinates(point.x(), point.y(), d1, d2);
235  // std::cout << "Fastinside cell " << point.x() << " " << point.y() << " " << d1 << " "<< d2 << " " << nx_ << " " << ny_ << std::endl;
236  if (d1 >= nx_ || d2 >= ny_) {
237  // std::cout << " Not in the map " <<std::endl;
238  return 9999;
239  }
240  unsigned cell = myCrystalNumberArray_[d1][d2];
241  // We are likely to be lucky
242  // std::cout << " Got the cell " << cell << std::endl;
243  if (validPads_[cell] && padsatdepth_[cell].inside(point)) {
244  // std::cout << " We are lucky " << cell << std::endl;
245  sp = padsatdepth_[cell].survivalProbability();
246  return cell;
247  }
248 
249  // std::cout << "Starting the loop " << std::endl;
250  bool status(true);
251  const std::vector<unsigned>& localCellVector(myCrystalWindowMap_->getCrystalWindow(cell, status));
252  if (status) {
253  unsigned size = localCellVector.size();
254  // std::cout << " Starting from " << EBDetId(regionOfInterest_[cell].getDetId()) << std::endl;
255  // const std::vector<DetId>& neighbours=myCalorimeter->getNeighbours(regionOfInterest_[cell].getDetId());
256  // std::cout << " The neighbours are " << std::endl;
257  // for(unsigned ic=0;ic<neighbours.size(); ++ic)
258  // {
259  // std::cout << EBDetId(neighbours[ic]) << std::endl;
260  // }
261  // std::cout << " Done " << std::endl;
262  for (unsigned ic = 0; ic < 8 && ic < size; ++ic) {
263  unsigned iq = localCellVector[ic];
264  // std::cout << " Testing " << EBDetId(regionOfInterest_[iq].getDetId()) << std::endl; ;
265  // std::cout << " " << iq << std::endl;
266  // std::cout << padsatdepth_[iq] ;
267  if (validPads_[iq] && padsatdepth_[iq].inside(point)) {
268  // std::cout << " Yes " << std::endl;
269  // myHistos->fill("h1000",niter);
270  sp = padsatdepth_[iq].survivalProbability();
271  // std::cout << "Finished the loop " << niter << std::endl;
272  // std::cout << "Inside " << std::endl;
273  return iq;
274  }
275  // std::cout << " Not inside " << std::endl;
276  // std::cout << "No " << std::endl;
277  }
278  }
279  if (debug)
280  std::cout << " not found in a quad, let's check the " << ncrackpadsatdepth_ << " cracks " << std::endl;
281  // std::cout << "Finished the loop " << niter << std::endl;
282  // Let's check the cracks
283  // std::cout << " Let's check the cracks " << ncrackpadsatdepth_ << " " << crackpadsatdepth_.size() << std::endl;
284  unsigned iquad = 0;
285  unsigned iquadinside = 999;
286  while (iquad < ncrackpadsatdepth_ && !found) {
287  // std::cout << " Inside the while " << std::endl;
288  if (crackpadsatdepth_[iquad].inside(point)) {
289  iquadinside = iquad;
290  found = true;
291  sp = crackpadsatdepth_[iquad].survivalProbability();
292  }
293  ++iquad;
294  }
295  // myHistos->fill("h1002",niter);
296  if (!found && debug)
297  std::cout << " Not found in the cracks " << std::endl;
298  return (found) ? crackpadsatdepth_[iquadinside].getNumber() : 9999;
299 }
size
Write out results.
unsigned ny_
Definition: EcalHitMaker.h:221
CrystalWindowMap * myCrystalWindowMap_
Definition: EcalHitMaker.h:233
void convertIntegerCoordinates(double x, double y, unsigned &ix, unsigned &iy) const
std::vector< CrystalPad > crackpadsatdepth_
Definition: EcalHitMaker.h:282
bool getCrystalWindow(unsigned, std::vector< unsigned > &) const
get the ordered list of the crystals around the crystal given as a first argument ...
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
unsigned ncrackpadsatdepth_
Definition: EcalHitMaker.h:259
#define debug
Definition: HDRShower.cc:19
std::vector< std::vector< unsigned > > myCrystalNumberArray_
Definition: EcalHitMaker.h:188
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
static constexpr float d1
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
unsigned nx_
Definition: EcalHitMaker.h:221

◆ gapsLifting()

void EcalHitMaker::gapsLifting ( std::vector< neighbour > &  gaps,
unsigned  iq 
)
private

Definition at line 1225 of file EcalHitMaker.cc.

References CaloDirectionOperations::add2d(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), correspondingEdge(), gather_cfg::cout, debug, diagonalEdge(), L1TDiffHarvesting_cfi::dir1, L1TDiffHarvesting_cfi::dir2, EAST, CrystalPad::edge(), dqmdumpme::first, NONE, NORTH, NORTHEAST, NORTHWEST, CaloDirectionOperations::oppositeSide(), padsatdepth_, point, SOUTH, SOUTHEAST, SOUTHWEST, unbalancedDirection(), and WEST.

Referenced by reorganizePads().

1225  {
1226  // std::cout << " Entering gapsLifting " << std::endl;
1227  CrystalPad& myPad = padsatdepth_[iq];
1228  unsigned ngaps = gaps.size();
1229  constexpr bool debug = false;
1230  if (ngaps == 1) {
1231  if (debug) {
1232  std::cout << " Avant " << ngaps << " " << gaps[0].first << std::endl;
1233  std::cout << myPad << std::endl;
1234  }
1235  if (gaps[0].first == NORTH || gaps[0].first == SOUTH) {
1238  myPad.edge(dir1) = correspondingEdge(gaps[0], EAST);
1239  myPad.edge(dir2) = correspondingEdge(gaps[0], WEST);
1240  } else {
1243  myPad.edge(dir1) = correspondingEdge(gaps[0], NORTH);
1244  myPad.edge(dir2) = correspondingEdge(gaps[0], SOUTH);
1245  }
1246  if (debug) {
1247  std::cout << " Apres " << std::endl;
1248  std::cout << myPad << std::endl;
1249  }
1250  } else if (ngaps == 2) {
1251  if (debug) {
1252  std::cout << " Avant " << ngaps << " " << gaps[0].first << " " << gaps[1].first << std::endl;
1253  std::cout << myPad << std::endl;
1254  std::cout << " Voisin 1 " << (gaps[0].second) << std::endl;
1255  std::cout << " Voisin 2 " << (gaps[1].second) << std::endl;
1256  }
1257  CaloDirection corner0 = CaloDirectionOperations::add2d(gaps[0].first, gaps[1].first);
1258 
1259  CLHEP::Hep2Vector point(0., 0.);
1260  if (corner0 != NONE && diagonalEdge(iq, corner0, point)) {
1261  CaloDirection corner1 =
1263  CaloDirection corner2 =
1265  myPad.edge(corner0) = point;
1266  myPad.edge(corner1) = correspondingEdge(gaps[1], CaloDirectionOperations::oppositeSide(gaps[0].first));
1267  myPad.edge(corner2) = correspondingEdge(gaps[0], CaloDirectionOperations::oppositeSide(gaps[1].first));
1268  } else if (corner0 == NONE) {
1269  if (gaps[0].first == EAST || gaps[0].first == WEST) {
1272  myPad.edge(corner1) = correspondingEdge(gaps[0], NORTH);
1273  myPad.edge(corner2) = correspondingEdge(gaps[0], SOUTH);
1274 
1275  corner1 = CaloDirectionOperations::add2d(gaps[1].first, NORTH);
1276  corner2 = CaloDirectionOperations::add2d(gaps[1].first, SOUTH);
1277  myPad.edge(corner1) = correspondingEdge(gaps[1], NORTH);
1278  myPad.edge(corner2) = correspondingEdge(gaps[1], SOUTH);
1279  } else {
1282  myPad.edge(corner1) = correspondingEdge(gaps[0], EAST);
1283  myPad.edge(corner2) = correspondingEdge(gaps[0], WEST);
1284 
1285  corner1 = CaloDirectionOperations::add2d(gaps[1].first, EAST);
1286  corner2 = CaloDirectionOperations::add2d(gaps[1].first, WEST);
1287  myPad.edge(corner1) = correspondingEdge(gaps[1], EAST);
1288  myPad.edge(corner2) = correspondingEdge(gaps[1], WEST);
1289  }
1290  }
1291  if (debug) {
1292  std::cout << " Apres " << std::endl;
1293  std::cout << myPad << std::endl;
1294  }
1295  } else if (ngaps == 3) {
1296  // in this case the four corners have to be changed
1297  unsigned iubd, idir1, idir2;
1298  CaloDirection diag;
1299  CLHEP::Hep2Vector point(0., 0.);
1300  // std::cout << " Yes : 3 gaps" << std::endl;
1301  if (unbalancedDirection(gaps, iubd, idir1, idir2)) {
1302  CaloDirection ubd(gaps[iubd].first), dir1(gaps[idir1].first);
1303  CaloDirection dir2(gaps[idir2].first);
1304 
1305  // std::cout << " Avant " << std::endl << myPad << std::endl;
1306  // std::cout << ubd << " " << dir1 << " " << dir2 << std::endl;
1307  diag = CaloDirectionOperations::add2d(ubd, dir1);
1308  if (diagonalEdge(iq, diag, point))
1309  myPad.edge(diag) = point;
1310  diag = CaloDirectionOperations::add2d(ubd, dir2);
1311  if (diagonalEdge(iq, diag, point))
1312  myPad.edge(diag) = point;
1314  myPad.edge(CaloDirectionOperations::add2d(oppside, dir1)) = correspondingEdge(gaps[idir1], oppside);
1315  myPad.edge(CaloDirectionOperations::add2d(oppside, dir2)) = correspondingEdge(gaps[idir2], oppside);
1316  // std::cout << " Apres " << std::endl << myPad << std::endl;
1317  }
1318  } else if (ngaps == 4) {
1319  // std::cout << " Waouh :4 gaps" << std::endl;
1320  // std::cout << " Avant " << std::endl;
1321  // std::cout << myPad<< std::endl;
1322  CLHEP::Hep2Vector point(0., 0.);
1323  if (diagonalEdge(iq, NORTHEAST, point))
1324  myPad.edge(NORTHEAST) = point;
1325  if (diagonalEdge(iq, NORTHWEST, point))
1326  myPad.edge(NORTHWEST) = point;
1327  if (diagonalEdge(iq, SOUTHWEST, point))
1328  myPad.edge(SOUTHWEST) = point;
1329  if (diagonalEdge(iq, SOUTHEAST, point))
1330  myPad.edge(SOUTHEAST) = point;
1331  // std::cout << " Apres " << std::endl;
1332  // std::cout << myPad<< std::endl;
1333  }
1334 }
static CaloDirection add2d(const CaloDirection &dir1, const CaloDirection &dir2)
static CaloDirection oppositeSide(const CaloDirection &side)
bool unbalancedDirection(const std::vector< neighbour > &dirs, unsigned &unb, unsigned &dir1, unsigned &dir2)
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
CLHEP::Hep2Vector & edge(unsigned iside, int n)
access to the corners in direction iside; n=0,1
Definition: CrystalPad.cc:222
CLHEP::Hep2Vector & correspondingEdge(neighbour &myneighbour, CaloDirection dir2)
#define debug
Definition: HDRShower.cc:19
CaloDirection
Codes the local directions in the cell lattice.
Definition: CaloDirection.h:9
Definition: TkAlStyle.h:43
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
bool diagonalEdge(unsigned myPad, CaloDirection dir, CLHEP::Hep2Vector &point)

◆ getCrystals()

const std::vector<Crystal>& EcalHitMaker::getCrystals ( ) const
inline

for debugging

Definition at line 135 of file EcalHitMaker.h.

References regionOfInterest_.

135 { return regionOfInterest_; }
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225

◆ getFSimTrack()

const FSimTrack* EcalHitMaker::getFSimTrack ( ) const
inline

To retrieve the track.

Definition at line 120 of file EcalHitMaker.h.

References myTrack_.

Referenced by HcalHitMaker::setDepth().

120 { return myTrack_; }
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271

◆ getHits()

const std::map< CaloHitID, float > & EcalHitMaker::getHits ( )
overridevirtual

get the map of the stored hits. Triggers the calculation of the grid if it has not been done.

Implements CaloHitMaker.

Definition at line 1098 of file EcalHitMaker.cc.

References Calorimeter::getEcalGeometry(), CaloSubdetectorGeometry::getGeometry(), ecalpyutils::hashedIndex(), CaloHitMaker::hitMap_, hitmaphasbeencalculated_, hits_, CaloHitMaker::myCalorimeter, ncrystals_, onEcal_, nano_mu_digi_cff::rawId, and regionOfInterest_.

Referenced by CalorimetryManager::EMShowerSimulation().

1098  {
1100  return hitMap_;
1101  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
1102  //calculate time of flight
1103  float tof = 0.0;
1104  if (onEcal_ == 1 || onEcal_ == 2)
1105  tof =
1106  (myCalorimeter->getEcalGeometry(onEcal_)->getGeometry(regionOfInterest_[ic].getDetId())->getPosition().mag()) /
1107  29.98; //speed of light
1108 
1109  if (onEcal_ == 1) {
1110  CaloHitID current_id(EBDetId(regionOfInterest_[ic].getDetId().rawId()).hashedIndex(), tof, 0); //no track yet
1111  hitMap_.insert(std::pair<CaloHitID, float>(current_id, hits_[ic]));
1112  } else if (onEcal_ == 2) {
1113  CaloHitID current_id(EEDetId(regionOfInterest_[ic].getDetId().rawId()).hashedIndex(), tof, 0); //no track yet
1114  hitMap_.insert(std::pair<CaloHitID, float>(current_id, hits_[ic]));
1115  }
1116  }
1117  hitmaphasbeencalculated_ = true;
1118  return hitMap_;
1119 }
const CaloSubdetectorGeometry * getEcalGeometry(int subdetn) const
Definition: Calorimeter.cc:132
std::map< CaloHitID, float > hitMap_
Definition: CaloHitMaker.h:61
unsigned ncrystals_
Definition: EcalHitMaker.h:219
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:36
virtual std::shared_ptr< const CaloCellGeometry > getGeometry(const DetId &id) const
Get the cell geometry of a given detector id. Should return false if not found.
std::vector< float > hits_
Definition: EcalHitMaker.h:226
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
bool hitmaphasbeencalculated_
Definition: EcalHitMaker.h:284

◆ getPads()

bool EcalHitMaker::getPads ( double  depth,
bool  inCm = false 
)

computes the crystals-plan intersection at depth (in X0 or L0 depending on the shower type) if it is not possible to go at such a depth, the result is false

Definition at line 821 of file EcalHitMaker.cc.

References a, b, bfactor_, central_, configuredGeometry_, configureGeometry(), corners, gather_cfg::cout, crackpadsatdepth_, currentdepth_, hcalRecHitTable_cff::depth, detailedShowerTail_, doreorg_, DetId::Ecal, CaloHitMaker::EMSHOWER, Crystal::getFirstEdge(), CaloHitMaker::HADSHOWER, cuy::ii, CaloHitMaker::interactionLength, CaloHitMaker::intersect(), CaloHitMaker::moliereRadius, myTrack_, ncrackpadsatdepth_, ncrystals_, normal_, npadsatdepth_, nx_, ny_, padsatdepth_, pivot_, plan_, prepareCrystalNumberArray(), pulled(), pulledPadProbability_, radiusCorrectionFactor_, radiusFactor_, regionOfInterest_, reorganizePads(), segments_, Validation_hcalonly_cfi::sign, sizex_, sizey_, validPads_, X0depthoffset_, xmax_, xmin_, geometryCSVtoXML::xx, ymax_, and ymin_.

Referenced by HFShower::compute(), HDShower::compute(), EMShower::compute(), and HDRShower::computeShower().

821  {
822  //std::cout << " New depth " << depth << std::endl;
823  // The first time, the relationship between crystals must be calculated
824  // but only in the case of EM showers
825 
828 
830  detailedShowerTail_ = false;
831  if (EMSHOWER)
833  else
835 
836  // if(currentdepth_>maxX0_+ps1TotalX0()+ps2TotalX0())
837  // {
838  // currentdepth_=maxX0_+ps1TotalX0()+ps2TotalX0()-1.; // the -1 is for safety
839  // detailedShowerTail_=true;
840  // }
841 
842  // std::cout << " FamosGrid::getQuads " << currentdepth_ << " " << maxX0_ << std::endl;
843 
844  ncrackpadsatdepth_ = 0;
845 
846  xmin_ = ymin_ = 999;
847  xmax_ = ymax_ = -999;
848  double locxmin, locxmax, locymin, locymax;
849 
850  // Get the depth of the pivot
851  std::vector<CaloSegment>::const_iterator segiterator;
852  // First identify the correct segment
853 
854  if (inCm) // centimeter
855  {
856  segiterator = find_if(segments_.begin(), segments_.end(), CaloSegment::inSegment(currentdepth_));
857  } else {
858  // EM shower
859  if (EMSHOWER)
860  segiterator = find_if(segments_.begin(), segments_.end(), CaloSegment::inX0Segment(currentdepth_));
861 
862  //Hadron shower
863  if (HADSHOWER)
864  segiterator = find_if(segments_.begin(), segments_.end(), CaloSegment::inL0Segment(currentdepth_));
865  }
866  if (segiterator == segments_.end()) {
867  std::cout << " FamosGrid: Could not go at such depth " << depth << std::endl;
868  std::cout << " EMSHOWER " << EMSHOWER << std::endl;
869  std::cout << " Track " << *myTrack_ << std::endl;
870  std::cout << " Segments " << segments_.size() << std::endl;
871  for (unsigned ii = 0; ii < segments_.size(); ++ii) {
872  std::cout << segments_[ii] << std::endl;
873  }
874 
875  return false;
876  }
877  // std::cout << *segiterator << std::endl;
878 
879  if (segiterator->whichDetector() != DetId::Ecal) {
880  std::cout << " In " << segiterator->whichDetector() << std::endl;
881  // buildPreshower();
882  return false;
883  }
884 
885  // std::cout << *segiterator << std::endl;
886  // get the position of the origin
887 
888  XYZPoint origin;
889  if (inCm) {
890  origin = segiterator->positionAtDepthincm(currentdepth_);
891  } else {
892  if (EMSHOWER)
893  origin = segiterator->positionAtDepthinX0(currentdepth_);
894  if (HADSHOWER)
895  origin = segiterator->positionAtDepthinL0(currentdepth_);
896  }
897  // std::cout << " currentdepth_ " << currentdepth_ << " " << origin << std::endl;
898  XYZVector newaxis = pivot_.getFirstEdge().Cross(normal_);
899 
900  // std::cout << "Normal " << normal_ << std::endl;
901  // std::cout << " New axis " << newaxis << std::endl;
902 
903  // std::cout << " ncrystals " << ncrystals << std::endl;
904  plan_ = Plane3D((Vector)normal_, (Point)origin);
905 
906  unsigned nquads = 0;
907  double sign = (central_) ? -1. : 1.;
908  Transform3DR trans((Point)origin,
909  (Point)(origin + normal_),
910  (Point)(origin + newaxis),
911  Point(0, 0, 0),
912  Point(0., 0., sign),
913  Point(0., 1., 0.));
914  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
915  // std::cout << " Building geometry for " << regionOfInterest_[ic].getCellID() << std::endl;
916  XYZPoint a, b;
917 
918  // std::cout << " Origin " << origin << std::endl;
919 
920  // std::vector<XYZPoint> corners;
921  // corners.reserve(4);
922  double dummyt;
923  bool hasbeenpulled = false;
924  bool behindback = false;
925  for (unsigned il = 0; il < 4; ++il) {
926  // a is the il-th front corner of the crystal. b is the corresponding rear corner
927  regionOfInterest_[ic].getLateralEdges(il, a, b);
928 
929  // pull the surface if necessary (only in the front of the crystals)
930  XYZPoint aprime = a;
931  if (pulled(origin, normal_, a)) {
932  b = aprime;
933  hasbeenpulled = true;
934  }
935 
936  // compute the intersection.
937  // Check that the intersection is in the [a,b] segment if HADSHOWER
938  // if EMSHOWER the intersection is calculated as if the crystals were infinite
939  XYZPoint xx = (EMSHOWER) ? intersect(plan_, a, b, dummyt, false) : intersect(plan_, a, b, dummyt, true);
940 
941  if (dummyt > 1)
942  behindback = true;
943  // std::cout << " Intersect " << il << " " << a << " " << b << " " << plan_ << " " << xx << std::endl;
944  // check that the intersection actually exists
945  if (xx.mag2() != 0) {
946  corners[il] = xx;
947  }
948  }
949  // std::cout << " ncorners " << corners.size() << std::endl;
950  if (behindback && EMSHOWER)
951  detailedShowerTail_ = true;
952  // If the quad is completly defined. Store it !
953  if (corners.size() == 4) {
954  padsatdepth_[ic] = CrystalPad(ic, corners, trans, bfactor_, !central_);
955  // Parameter to be tuned
956  if (hasbeenpulled)
957  padsatdepth_[ic].setSurvivalProbability(pulledPadProbability_);
958  validPads_[ic] = true;
959  ++nquads;
960  // In principle, this should be done after the quads reorganization. But it would cost one more loop
961  // quadsatdepth_[ic].extrems(locxmin,locxmax,locymin,locymax);
962  // if(locxmin<xmin_) xmin_=locxmin;
963  // if(locymin<ymin_) ymin_=locymin;
964  // if(locxmax>xmax_) xmax_=locxmax;
965  // if(locymax>ymax_) ymax_=locymax;
966  } else {
967  padsatdepth_[ic] = CrystalPad();
968  validPads_[ic] = false;
969  }
970  }
971  // std::cout << " Number of quads " << quadsatdepth_.size() << std::endl;
972  if (doreorg_)
973  reorganizePads();
974  // std::cout << "Finished to reorganize " << std::endl;
975  npadsatdepth_ = nquads;
976  // std::cout << " prepareCellIDMap " << std::endl;
977 
978  // Resize the Quads to allow for some numerical inaccuracy
979  // in the "inside" function
980  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
981  if (!validPads_[ic])
982  continue;
983 
984  if (EMSHOWER)
985  padsatdepth_[ic].resetCorners();
986 
987  padsatdepth_[ic].extrems(locxmin, locxmax, locymin, locymax);
988  if (locxmin < xmin_)
989  xmin_ = locxmin;
990  if (locymin < ymin_)
991  ymin_ = locymin;
992  if (locxmax > xmax_)
993  xmax_ = locxmax;
994  if (locymax > ymax_)
995  ymax_ = locymax;
996  }
997 
998  sizex_ = (xmax_ - xmin_) / nx_;
999  sizey_ = (ymax_ - ymin_) / ny_;
1000 
1001  // Make sure that sizex_ and sizey_ are set before running prepareCellIDMap
1003 
1004  // std::cout << " Finished prepareCellIDMap " << std::endl;
1006 
1007  return true;
1008 }
XYZNormal normal_
Definition: EcalHitMaker.h:214
double pulledPadProbability_
Definition: EcalHitMaker.h:264
bool detailedShowerTail_
Definition: EcalHitMaker.h:250
unsigned ny_
Definition: EcalHitMaker.h:221
std::vector< CrystalPad > crackpadsatdepth_
Definition: EcalHitMaker.h:282
void reorganizePads()
ROOT::Math::Plane3D::Vector Vector
Definition: EcalHitMaker.cc:29
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
Plane3D plan_
Definition: EcalHitMaker.h:261
void prepareCrystalNumberArray()
double currentdepth_
Definition: EcalHitMaker.h:252
unsigned ncrystals_
Definition: EcalHitMaker.h:219
bool pulled(const XYZPoint &origin, const XYZNormal &normal, XYZPoint &fPoint) const
bool configuredGeometry_
Definition: EcalHitMaker.h:218
const XYZVector & getFirstEdge() const
Direction of the first edge.
Definition: Crystal.h:42
double radiusCorrectionFactor_
Definition: EcalHitMaker.h:246
double radiusFactor_
Definition: EcalHitMaker.h:248
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
static XYZPoint intersect(const Plane3D &p, const XYZPoint &a, const XYZPoint &b, double &t, bool segment, bool debug=false)
Definition: CaloHitMaker.cc:41
ii
Definition: cuy.py:589
ROOT::Math::Plane3D Plane3D
Definition: EcalHitMaker.h:29
This class is used to determine if a point lies in the segment.
Definition: CaloSegment.h:87
unsigned ncrackpadsatdepth_
Definition: EcalHitMaker.h:259
std::vector< XYZPoint > corners
Definition: EcalHitMaker.h:288
double bfactor_
Definition: EcalHitMaker.h:254
Crystal pivot_
Definition: EcalHitMaker.h:212
void configureGeometry()
double interactionLength
Definition: CaloHitMaker.h:47
double b
Definition: hdecay.h:120
double moliereRadius
Definition: CaloHitMaker.h:46
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
math::XYZVector XYZPoint
Structure Point Contains parameters of Gaussian fits to DMRs.
double a
Definition: hdecay.h:121
double X0depthoffset_
Definition: EcalHitMaker.h:193
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
ROOT::Math::Plane3D::Point Point
Definition: EcalHitMaker.cc:30
unsigned npadsatdepth_
Definition: EcalHitMaker.h:260
math::XYZVector XYZVector
Definition: RawParticle.h:26
std::vector< CaloSegment > segments_
Definition: EcalHitMaker.h:276
unsigned nx_
Definition: EcalHitMaker.h:221

◆ getSegments()

const std::vector<CaloSegment>& EcalHitMaker::getSegments ( ) const
inline

retrieve the segments (the path in the crystal crossed by the extrapolation of the track. Debugging only

Definition at line 95 of file EcalHitMaker.h.

References segments_.

Referenced by HcalHitMaker::setDepth().

95 { return segments_; };
std::vector< CaloSegment > segments_
Definition: EcalHitMaker.h:276

◆ getX0back()

double EcalHitMaker::getX0back ( ) const
inline

Definition at line 104 of file EcalHitMaker.h.

References maxX0_.

Referenced by EMShower::compute().

104 { return maxX0_; }

◆ hcalCellLine()

void EcalHitMaker::hcalCellLine ( std::vector< CaloPoint > &  cp) const
private

Definition at line 465 of file EcalHitMaker.cc.

References DeadROC_duringRun::dir, PVValHelper::eta, DetId::Hcal, FSimTrack::hcalEntrance(), Calorimeter::hcalProperties(), CaloHitMaker::myCalorimeter, myTrack_, FSimTrack::onHcal(), FSimTrack::onVFcal(), CalorimeterProperties::thickness(), Calorimetry_cff::thickness, RawParticle::Vect(), RawParticle::vertex(), and FSimTrack::vfcalEntrance().

Referenced by cellLine().

465  {
466  // FSimEvent& mySimEvent = myEventMgr->simSignal();
467  // FSimTrack myTrack = mySimEvent.track(fsimtrack_);
468  int onHcal = myTrack_->onHcal();
469 
470  if (onHcal <= 2 && onHcal > 0) {
471  XYZPoint point1 = (myTrack_->hcalEntrance().vertex()).Vect();
472 
473  double eta = point1.eta();
474  // HCAL thickness in cm (assuming that the particle is coming from 000)
475  double thickness = myCalorimeter->hcalProperties(onHcal)->thickness(eta);
476  cp.push_back(CaloPoint(DetId::Hcal, point1));
477  XYZVector dir = myTrack_->hcalEntrance().Vect().Unit();
478  XYZPoint point2 = point1 + dir * thickness;
479 
480  cp.push_back(CaloPoint(DetId::Hcal, point2));
481  }
482  int onVFcal = myTrack_->onVFcal();
483  if (onVFcal == 2) {
484  XYZPoint point1 = (myTrack_->vfcalEntrance().vertex()).Vect();
485  double eta = point1.eta();
486  // HCAL thickness in cm (assuming that the particle is coming from 000)
488  cp.push_back(CaloPoint(DetId::Hcal, point1));
489  XYZVector dir = myTrack_->vfcalEntrance().Vect().Unit();
490  if (thickness > 0) {
491  XYZPoint point2 = point1 + dir * thickness;
492  cp.push_back(CaloPoint(DetId::Hcal, point2));
493  }
494  }
495 }
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
Definition: FSimTrack.h:149
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:146
int onHcal() const
Definition: FSimTrack.h:116
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
int onVFcal() const
Definition: FSimTrack.h:121
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
math::XYZVector XYZPoint
virtual double thickness(double eta) const =0
Thickness (in cm) of the homegeneous material as a function of rapidity.
math::XYZVector XYZVector
Definition: RawParticle.h:26
const HCALProperties * hcalProperties(int onHcal) const
HCAL properties.
Definition: Calorimeter.cc:88
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ hcalTotalL0()

double EcalHitMaker::hcalTotalL0 ( ) const
inline

in the HCAL

Definition at line 88 of file EcalHitMaker.h.

References L0HCAL_.

Referenced by HDRShower::computeShower(), HDShower::HDShower(), and HFShower::HFShower().

88 { return L0HCAL_; }
double L0HCAL_
Definition: EcalHitMaker.h:204

◆ hcalTotalX0()

double EcalHitMaker::hcalTotalX0 ( ) const
inline

in the HCAL

Definition at line 73 of file EcalHitMaker.h.

References X0HCAL_.

Referenced by EMShower::prepareSteps().

73 { return X0HCAL_; }
double X0HCAL_
Definition: EcalHitMaker.h:199

◆ inside3D()

bool EcalHitMaker::inside3D ( const std::vector< XYZPoint > &  corners,
const XYZPoint p 
) const
private

Definition at line 1379 of file EcalHitMaker.cc.

References corners, and AlCaHLTBitMon_ParallelJobs::p.

Referenced by ecalCellLine().

1379  {
1380  // corners and p are in the same plane
1381  // p is inside "corners" if the four crossproducts (corners[i]xcorners[i+1])
1382  // are in the same direction
1383 
1384  XYZVector crossproduct(0., 0., 0.), previouscrossproduct(0., 0., 0.);
1385 
1386  for (unsigned ip = 0; ip < 4; ++ip) {
1387  crossproduct = (corners[ip] - p).Cross(corners[(ip + 1) % 4] - p);
1388  if (ip == 0)
1389  previouscrossproduct = crossproduct;
1390  else if (crossproduct.Dot(previouscrossproduct) < 0.)
1391  return false;
1392  }
1393 
1394  return true;
1395 }
std::vector< XYZPoint > corners
Definition: EcalHitMaker.h:288
math::XYZVector XYZVector
Definition: RawParticle.h:26

◆ prepareCrystalNumberArray()

void EcalHitMaker::prepareCrystalNumberArray ( )
private

Definition at line 1078 of file EcalHitMaker.cc.

References convertIntegerCoordinates(), d1, myCrystalNumberArray_, npadsatdepth_, padsatdepth_, validPads_, x, and y.

Referenced by getPads().

1078  {
1079  for (unsigned iq = 0; iq < npadsatdepth_; ++iq) {
1080  if (!validPads_[iq])
1081  continue;
1082  unsigned d1, d2;
1083  convertIntegerCoordinates(padsatdepth_[iq].center().x(), padsatdepth_[iq].center().y(), d1, d2);
1084  myCrystalNumberArray_[d1][d2] = iq;
1085  }
1086 }
void convertIntegerCoordinates(double x, double y, unsigned &ix, unsigned &iy) const
std::vector< CrystalPad > padsatdepth_
Definition: EcalHitMaker.h:281
std::vector< std::vector< unsigned > > myCrystalNumberArray_
Definition: EcalHitMaker.h:188
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
unsigned npadsatdepth_
Definition: EcalHitMaker.h:260
static constexpr float d1

◆ preshowerCellLine()

void EcalHitMaker::preshowerCellLine ( std::vector< CaloPoint > &  cp) const
private

Definition at line 420 of file EcalHitMaker.cc.

References DeadROC_duringRun::dir, DetId::Ecal, EcalPreshower, RawParticle::eta(), FSimTrack::layer1Entrance(), Calorimeter::layer1Properties(), FSimTrack::layer2Entrance(), Calorimeter::layer2Properties(), CaloHitMaker::myCalorimeter, myTrack_, FSimTrack::onLayer1(), FSimTrack::onLayer2(), PreshowerLayer1Properties::thickness(), PreshowerLayer2Properties::thickness(), RawParticle::Vect(), and RawParticle::vertex().

Referenced by cellLine().

420  {
421  // FSimEvent& mySimEvent = myEventMgr->simSignal();
422  // FSimTrack myTrack = mySimEvent.track(fsimtrack_);
423  // std::cout << "FsimTrack " << fsimtrack_<< std::endl;
424  // std::cout << " On layer 1 " << myTrack.onLayer1() << std::endl;
425  // std::cout << " preshowerCellLine " << std::endl;
426  if (myTrack_->onLayer1()) {
427  XYZPoint point1 = (myTrack_->layer1Entrance().vertex()).Vect();
428  double phys_eta = myTrack_->layer1Entrance().eta();
429  double cmthickness = myCalorimeter->layer1Properties(1)->thickness(phys_eta);
430 
431  if (cmthickness > 0) {
432  XYZVector dir = myTrack_->layer1Entrance().Vect().Unit();
433  XYZPoint point2 = point1 + dir * cmthickness;
434 
435  CaloPoint cp1(DetId::Ecal, EcalPreshower, 1, point1);
436  CaloPoint cp2(DetId::Ecal, EcalPreshower, 1, point2);
437  cp.push_back(cp1);
438  cp.push_back(cp2);
439  } else {
440  // std::cout << "Track on ECAL " << myTrack.EcalEntrance_().vertex()*0.1<< std::endl;
441  }
442  }
443 
444  // std::cout << " On layer 2 " << myTrack.onLayer2() << std::endl;
445  if (myTrack_->onLayer2()) {
446  XYZPoint point1 = (myTrack_->layer2Entrance().vertex()).Vect();
447  double phys_eta = myTrack_->layer2Entrance().eta();
448  double cmthickness = myCalorimeter->layer2Properties(1)->thickness(phys_eta);
449  if (cmthickness > 0) {
450  XYZVector dir = myTrack_->layer2Entrance().Vect().Unit();
451  XYZPoint point2 = point1 + dir * cmthickness;
452 
453  CaloPoint cp1(DetId::Ecal, EcalPreshower, 2, point1);
454  CaloPoint cp2(DetId::Ecal, EcalPreshower, 2, point2);
455 
456  cp.push_back(cp1);
457  cp.push_back(cp2);
458  } else {
459  // std::cout << "Track on ECAL " << myTrack.EcalEntrance_().vertex()*0.1 << std::endl;
460  }
461  }
462  // std::cout << " Exit preshower CellLine " << std::endl;
463 }
const PreshowerLayer1Properties * layer1Properties(int onLayer1) const
Preshower Layer1 properties.
Definition: Calorimeter.cc:103
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
Definition: FSimTrack.h:140
const PreshowerLayer2Properties * layer2Properties(int onLayer2) const
Preshower Layer2 properties.
Definition: Calorimeter.cc:110
const CaloGeometryHelper * myCalorimeter
Definition: CaloHitMaker.h:44
double thickness(const double eta) const override
double eta() const
Definition: RawParticle.h:279
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
int onLayer2() const
Definition: FSimTrack.h:106
int onLayer1() const
Definition: FSimTrack.h:101
XYZVector Vect() const
the momentum threevector
Definition: RawParticle.h:323
double thickness(double eta) const override
math::XYZVector XYZPoint
math::XYZVector XYZVector
Definition: RawParticle.h:26
const RawParticle & layer1Entrance() const
The particle at Preshower Layer 1.
Definition: FSimTrack.h:137
const XYZTLorentzVector & vertex() const
the vertex fourvector
Definition: RawParticle.h:320

◆ ps1TotalL0()

double EcalHitMaker::ps1TotalL0 ( ) const
inline

total number of L0 in the PS (Layer1).

Definition at line 76 of file EcalHitMaker.h.

References L0PS1_.

76 { return L0PS1_; }

◆ ps1TotalX0()

double EcalHitMaker::ps1TotalX0 ( ) const
inline

Definition at line 58 of file EcalHitMaker.h.

References X0PS1_.

Referenced by EMShower::prepareSteps().

58 { return X0PS1_; }

◆ ps2eeTotalL0()

double EcalHitMaker::ps2eeTotalL0 ( ) const
inline

Definition at line 82 of file EcalHitMaker.h.

References L0PS2EE_.

82 { return L0PS2EE_; }
double L0PS2EE_
Definition: EcalHitMaker.h:202

◆ ps2eeTotalX0()

double EcalHitMaker::ps2eeTotalX0 ( ) const
inline

Definition at line 64 of file EcalHitMaker.h.

References X0PS2EE_.

Referenced by EMShower::prepareSteps().

64 { return X0PS2EE_; }
double X0PS2EE_
Definition: EcalHitMaker.h:196

◆ ps2TotalL0()

double EcalHitMaker::ps2TotalL0 ( ) const
inline

total number of L0 in the PS (Layer2).

Definition at line 79 of file EcalHitMaker.h.

References L0PS2_.

79 { return L0PS2_; }

◆ ps2TotalX0()

double EcalHitMaker::ps2TotalX0 ( ) const
inline

total number of X0 in the PS (Layer2).

Definition at line 61 of file EcalHitMaker.h.

References X0PS2_.

Referenced by EMShower::prepareSteps().

61 { return X0PS2_; }

◆ pulled()

bool EcalHitMaker::pulled ( const XYZPoint origin,
const XYZNormal normal,
XYZPoint fPoint 
) const
private

Definition at line 1067 of file EcalHitMaker.cc.

References normal.

Referenced by getPads().

1067  {
1068  // check if fPoint is behind the origin
1069  double dotproduct = normal.Dot(fPoint - origin);
1070  if (dotproduct <= 0.)
1071  return false;
1072 
1073  //norm of normal is 1
1074  fPoint -= (1 + dotproduct) * normal;
1075  return true;
1076 }
static const char * normal
Definition: DMRtrends.cc:35

◆ reorganizePads()

void EcalHitMaker::reorganizePads ( )
private

Definition at line 1123 of file EcalHitMaker.cc.

References crackpadsatdepth_, cracksPads(), etasize_, gapsLifting(), ncrackpadsatdepth_, ncrystals_, phisize_, regionOfInterest_, CaloDirectionOperations::Side(), and validPads_.

Referenced by getPads().

1123  {
1124  // Some cleaning first
1125  // std::cout << " Starting reorganize " << std::endl;
1126  crackpadsatdepth_.clear();
1127  crackpadsatdepth_.reserve(etasize_ * phisize_);
1128  ncrackpadsatdepth_ = 0;
1129  std::vector<neighbour> gaps;
1130  std::vector<std::vector<neighbour> > cracks;
1131  // cracks.clear();
1132  cracks.resize(ncrystals_);
1133 
1134  for (unsigned iq = 0; iq < ncrystals_; ++iq) {
1135  if (!validPads_[iq])
1136  continue;
1137 
1138  gaps.clear();
1139  // std::cout << padsatdepth_[iq] << std::endl;
1140  //check all the directions
1141  for (unsigned iside = 0; iside < 4; ++iside) {
1142  // std::cout << " To be glued " << iside << " " << regionOfInterest_[iq].crystalNeighbour(iside).toBeGlued() << std::endl;
1143  CaloDirection thisside = CaloDirectionOperations::Side(iside);
1144  if (regionOfInterest_[iq].crystalNeighbour(iside).toBeGlued()) {
1145  // look for the neighbour and check that it exists
1146  int neighbourstatus = regionOfInterest_[iq].crystalNeighbour(iside).status();
1147  if (neighbourstatus < 0)
1148  continue;
1149 
1150  unsigned neighbourNumber = regionOfInterest_[iq].crystalNeighbour(iside).number();
1151  if (!validPads_[neighbourNumber])
1152  continue;
1153  // there is a crack between
1154  if (neighbourstatus == 1) {
1155  // std::cout << " 1 Crack : " << thisside << " " << cellids_[iq]<< " " << cellids_[neighbourNumber] << std::endl;
1156  cracks[iq].push_back(neighbour(thisside, neighbourNumber));
1157  } // else it is a gap
1158  else {
1159  gaps.push_back(neighbour(thisside, neighbourNumber));
1160  }
1161  }
1162  }
1163  // Now lift the gaps
1164  gapsLifting(gaps, iq);
1165  }
1166 
1167  unsigned ncracks = cracks.size();
1168  // std::cout << " Cracks treatment : " << cracks.size() << std::endl;
1169  for (unsigned icrack = 0; icrack < ncracks; ++icrack) {
1170  // std::cout << " Crack number " << crackiter->first << std::endl;
1171  cracksPads(cracks[icrack], icrack);
1172  }
1173 }
std::vector< CrystalPad > crackpadsatdepth_
Definition: EcalHitMaker.h:282
unsigned ncrystals_
Definition: EcalHitMaker.h:219
unsigned etasize_
Definition: EcalHitMaker.h:239
void cracksPads(std::vector< neighbour > &cracks, unsigned iq)
unsigned phisize_
Definition: EcalHitMaker.h:240
static CaloDirection Side(unsigned i)
unsigned int -> Side conversion
void gapsLifting(std::vector< neighbour > &gaps, unsigned iq)
std::pair< CaloDirection, unsigned > neighbour
Definition: EcalHitMaker.h:168
unsigned ncrackpadsatdepth_
Definition: EcalHitMaker.h:259
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
std::vector< bool > validPads_
Definition: EcalHitMaker.h:228
CaloDirection
Codes the local directions in the cell lattice.
Definition: CaloDirection.h:9

◆ setCrackPadSurvivalProbability()

void EcalHitMaker::setCrackPadSurvivalProbability ( double  val)
inline

Definition at line 129 of file EcalHitMaker.h.

References crackPadProbability_, and heppy_batch::val.

Referenced by CalorimetryManager::EMShowerSimulation().

◆ setPreshowerPresent()

void EcalHitMaker::setPreshowerPresent ( bool  ps)
inline

Definition at line 132 of file EcalHitMaker.h.

References simulatePreshower_.

Referenced by CalorimetryManager::EMShowerSimulation().

132 { simulatePreshower_ = ps; };
bool simulatePreshower_
Definition: EcalHitMaker.h:256

◆ setPulledPadSurvivalProbability()

void EcalHitMaker::setPulledPadSurvivalProbability ( double  val)
inline

Definition at line 127 of file EcalHitMaker.h.

References pulledPadProbability_, and heppy_batch::val.

Referenced by CalorimetryManager::EMShowerSimulation().

◆ setRadiusFactor()

void EcalHitMaker::setRadiusFactor ( double  r)
inline

◆ setSpotEnergy()

void EcalHitMaker::setSpotEnergy ( double  e)
inlineoverridevirtual

◆ setTrackParameters()

void EcalHitMaker::setTrackParameters ( const XYZNormal normal,
double  X0depthoffset,
const FSimTrack theTrack 
)

Definition at line 301 of file EcalHitMaker.cc.

References buildSegments(), cellLine(), DeadROC_duringRun::dir, DetId::Ecal, ecalFirstSegment_, ecalTotalX0(), CaloHitMaker::EMSHOWER, intersections_, maxX0_, myTrack_, ncrystals_, normal, normal_, onEcal_, regionOfInterest_, segments_, CaloDirectionOperations::Side(), and X0depthoffset_.

Referenced by CalorimetryManager::EMShowerSimulation(), CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::MuonMipSimulation().

301  {
302  // myHistos->debug("setTrackParameters");
303  // std::cout << " Track " << theTrack << std::endl;
304  intersections_.clear();
305  // This is certainly enough
306  intersections_.reserve(50);
307  myTrack_ = &theTrack;
308  normal_ = normal.Unit();
309  X0depthoffset_ = X0depthoffset;
312  // std::cout << " Segments " << segments_.size() << std::endl;
313  // for(unsigned ii=0; ii<segments_.size() ; ++ii)
314  // {
315  // std::cout << segments_[ii] << std::endl;
316  // }
317 
318  // This is only needed in case of electromagnetic showers
319  if (EMSHOWER && onEcal_ && ecalTotalX0() > 0.) {
320  // std::cout << "Total X0 " << ecalTotalX0() << std::endl;
321  for (unsigned ic = 0; ic < ncrystals_; ++ic) {
322  for (unsigned idir = 0; idir < 4; ++idir) {
323  XYZVector norm = regionOfInterest_[ic].exitingNormal(CaloDirectionOperations::Side(idir));
324  regionOfInterest_[ic].crystalNeighbour(idir).setToBeGlued((norm.Dot(normal_) < 0.));
325  }
326  // Now calculate the distance in X0 of the back sides of the crystals
327  // (only for EM showers)
328  if (EMSHOWER) {
329  XYZVector dir = regionOfInterest_[ic].getBackCenter() - segments_[ecalFirstSegment_].entrance();
330  double dist = dir.Dot(normal_);
331  double absciss = dist + segments_[ecalFirstSegment_].sEntrance();
332  std::vector<CaloSegment>::const_iterator segiterator;
333  // First identify the correct segment
334  // std::cout << " Crystal " << ic << regionOfInterest_[ic].getBackCenter() ;
335  // std::cout << " Entrance : " << segments_[ecalFirstSegment_].entrance()<< std::endl;
336  // std::cout << " Looking for the segment " << dist << std::endl;
337  segiterator = find_if(segments_.begin(), segments_.end(), CaloSegment::inSegment(absciss));
338  // std::cout << " Done " << std::endl;
339  if (segiterator == segments_.end()) {
340  // in this case, we won't have any problem. No need to
341  // calculate the real depth.
342  regionOfInterest_[ic].setX0Back(9999);
343  } else {
344  DetId::Detector det(segiterator->whichDetector());
345  if (det != DetId::Ecal) {
346  regionOfInterest_[ic].setX0Back(9999);
347  } else {
348  double x0 = segiterator->x0FromCm(dist);
349  if (x0 < maxX0_)
350  maxX0_ = x0;
351  regionOfInterest_[ic].setX0Back(x0);
352  }
353  }
354  // myHistos->fill("h4000",ecalentrance_.eta(), regionOfInterest_[ic].getX0Back());
355  //}
356  // else
357  //{
358  // // in this case, we won't have any problem. No need to
359  // // calculate the real depth.
360  // regionOfInterest_[ic].setX0Back(9999);
361  //}
362  } //EMSHOWER
363  } // ndir
364  // myHistos->fill("h6000",segments_[ecalFirstSegment_].entrance().eta(),maxX0_);
365  }
366  // std::cout << "Leaving setTrackParameters" << std::endl
367 }
XYZNormal normal_
Definition: EcalHitMaker.h:214
static const char * normal
Definition: DMRtrends.cc:35
unsigned ncrystals_
Definition: EcalHitMaker.h:219
const FSimTrack * myTrack_
Definition: EcalHitMaker.h:271
double ecalTotalX0() const
in the ECAL
Definition: EcalHitMaker.h:67
std::vector< CaloPoint > intersections_
Definition: EcalHitMaker.h:274
static CaloDirection Side(unsigned i)
unsigned int -> Side conversion
Detector
Definition: DetId.h:24
void cellLine(std::vector< CaloPoint > &cp)
int ecalFirstSegment_
Definition: EcalHitMaker.h:236
std::vector< Crystal > regionOfInterest_
Definition: EcalHitMaker.h:225
void buildSegments(const std::vector< CaloPoint > &cp)
double X0depthoffset_
Definition: EcalHitMaker.h:193
math::XYZVector XYZVector
Definition: RawParticle.h:26
std::vector< CaloSegment > segments_
Definition: EcalHitMaker.h:276

◆ totalL0()

double EcalHitMaker::totalL0 ( ) const
inline

Number of interaction length "seen" by the track.

Definition at line 52 of file EcalHitMaker.h.

References totalL0_.

52 { return totalL0_; };
double totalL0_
Definition: EcalHitMaker.h:192

◆ totalX0()

double EcalHitMaker::totalX0 ( ) const
inline

Definition at line 49 of file EcalHitMaker.h.

References totalX0_.

Referenced by EMShower::prepareSteps().

49 { return totalX0_; };
double totalX0_
Definition: EcalHitMaker.h:191

◆ unbalancedDirection()

bool EcalHitMaker::unbalancedDirection ( const std::vector< neighbour > &  dirs,
unsigned &  unb,
unsigned &  dir1,
unsigned &  dir2 
)
private

Definition at line 1196 of file EcalHitMaker.cc.

References CaloDirectionOperations::add2d(), L1TDiffHarvesting_cfi::dir1, L1TDiffHarvesting_cfi::dir2, heppy_check::dirs, dqmdumpme::first, NONE, and createJobs::tmp.

Referenced by gapsLifting().

1199  {
1200  if (dirs.size() == 1)
1201  return false;
1202  if (dirs.size() % 2 == 0)
1203  return false;
1206  if (tmp == NONE) {
1207  unb = 2;
1208  dir1 = 0;
1209  dir2 = 1;
1210  return true;
1211  }
1213  if (tmp == NONE) {
1214  unb = 1;
1215  dir1 = 0;
1216  dir2 = 2;
1217  return true;
1218  }
1219  unb = 0;
1220  dir1 = 1;
1221  dir2 = 2;
1222  return true;
1223 }
static CaloDirection add2d(const CaloDirection &dir1, const CaloDirection &dir2)
CaloDirection
Codes the local directions in the cell lattice.
Definition: CaloDirection.h:9
Definition: TkAlStyle.h:43
tmp
align.sh
Definition: createJobs.py:716

◆ x0DepthOffset()

double EcalHitMaker::x0DepthOffset ( ) const
inline

get the offset (e.g the number of X0 after which the shower starts)

Definition at line 55 of file EcalHitMaker.h.

References X0depthoffset_.

Referenced by EMShower::prepareSteps().

55 { return X0depthoffset_; }
double X0depthoffset_
Definition: EcalHitMaker.h:193

Member Data Documentation

◆ bfactor_

double EcalHitMaker::bfactor_
private

Definition at line 254 of file EcalHitMaker.h.

Referenced by configureGeometry(), EcalHitMaker(), and getPads().

◆ CellsWindow_

std::vector<DetId> EcalHitMaker::CellsWindow_
private

Definition at line 224 of file EcalHitMaker.h.

Referenced by buildGeometry(), and EcalHitMaker().

◆ central_

int EcalHitMaker::central_
private

Definition at line 215 of file EcalHitMaker.h.

Referenced by cellLine(), EcalHitMaker(), and getPads().

◆ configuredGeometry_

bool EcalHitMaker::configuredGeometry_
private

Definition at line 218 of file EcalHitMaker.h.

Referenced by buildGeometry(), configureGeometry(), and getPads().

◆ corners

std::vector<XYZPoint> EcalHitMaker::corners
private

Definition at line 288 of file EcalHitMaker.h.

Referenced by ecalCellLine(), EcalHitMaker(), getPads(), and inside3D().

◆ crackPadProbability_

double EcalHitMaker::crackPadProbability_
private

Definition at line 266 of file EcalHitMaker.h.

Referenced by cracksPads(), and setCrackPadSurvivalProbability().

◆ crackpadsatdepth_

std::vector<CrystalPad> EcalHitMaker::crackpadsatdepth_
private

Definition at line 282 of file EcalHitMaker.h.

Referenced by cracksPads(), fastInsideCell(), getPads(), and reorganizePads().

◆ currentdepth_

double EcalHitMaker::currentdepth_
private

Definition at line 252 of file EcalHitMaker.h.

Referenced by getPads().

◆ detailedShowerTail_

bool EcalHitMaker::detailedShowerTail_
private

Definition at line 250 of file EcalHitMaker.h.

Referenced by getPads().

◆ DetIdMap_

std::map<DetId, unsigned> EcalHitMaker::DetIdMap_
private

Definition at line 231 of file EcalHitMaker.h.

Referenced by buildGeometry(), and configureGeometry().

◆ doreorg_

bool EcalHitMaker::doreorg_
private

Definition at line 278 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), and getPads().

◆ EcalEntrance_

XYZPoint EcalHitMaker::EcalEntrance_
private

◆ ecalFirstSegment_

int EcalHitMaker::ecalFirstSegment_
private

Definition at line 236 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and setTrackParameters().

◆ etasize_

unsigned EcalHitMaker::etasize_
private

Definition at line 239 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), and reorganizePads().

◆ hitmaphasbeencalculated_

bool EcalHitMaker::hitmaphasbeencalculated_
private

Definition at line 284 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), and getHits().

◆ hits_

std::vector<float> EcalHitMaker::hits_
private

Definition at line 226 of file EcalHitMaker.h.

Referenced by addHit(), addHitDepth(), buildGeometry(), and getHits().

◆ intersections_

std::vector<CaloPoint> EcalHitMaker::intersections_
private

Definition at line 274 of file EcalHitMaker.h.

Referenced by setTrackParameters().

◆ L0ECAL_

double EcalHitMaker::L0ECAL_
private

Definition at line 203 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ecalTotalL0().

◆ L0EHGAP_

double EcalHitMaker::L0EHGAP_
private

Definition at line 205 of file EcalHitMaker.h.

Referenced by buildSegments(), ecalHcalGapTotalL0(), and EcalHitMaker().

◆ L0HCAL_

double EcalHitMaker::L0HCAL_
private

Definition at line 204 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and hcalTotalL0().

◆ L0PS1_

double EcalHitMaker::L0PS1_
private

Definition at line 200 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps1TotalL0().

◆ L0PS2_

double EcalHitMaker::L0PS2_
private

Definition at line 201 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps2TotalL0().

◆ L0PS2EE_

double EcalHitMaker::L0PS2EE_
private

Definition at line 202 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps2eeTotalL0().

◆ maxX0_

double EcalHitMaker::maxX0_
private

Definition at line 207 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), getX0back(), and setTrackParameters().

◆ mycorners

std::vector<CLHEP::Hep2Vector> EcalHitMaker::mycorners
private

Definition at line 287 of file EcalHitMaker.h.

Referenced by cracksPads(), and EcalHitMaker().

◆ myCrystalNumberArray_

std::vector<std::vector<unsigned> > EcalHitMaker::myCrystalNumberArray_
private

Definition at line 188 of file EcalHitMaker.h.

Referenced by buildGeometry(), fastInsideCell(), and prepareCrystalNumberArray().

◆ myCrystalWindowMap_

CrystalWindowMap* EcalHitMaker::myCrystalWindowMap_
private

Definition at line 233 of file EcalHitMaker.h.

Referenced by buildGeometry(), EcalHitMaker(), fastInsideCell(), and ~EcalHitMaker().

◆ myTrack_

const FSimTrack* EcalHitMaker::myTrack_
private

◆ ncrackpadsatdepth_

unsigned EcalHitMaker::ncrackpadsatdepth_
private

Definition at line 259 of file EcalHitMaker.h.

Referenced by fastInsideCell(), getPads(), and reorganizePads().

◆ ncrystals_

unsigned EcalHitMaker::ncrystals_
private

◆ normal_

XYZNormal EcalHitMaker::normal_
private

Definition at line 214 of file EcalHitMaker.h.

Referenced by cellLine(), ecalCellLine(), getPads(), and setTrackParameters().

◆ npadsatdepth_

unsigned EcalHitMaker::npadsatdepth_
private

Definition at line 260 of file EcalHitMaker.h.

Referenced by getPads(), and prepareCrystalNumberArray().

◆ nx_

unsigned EcalHitMaker::nx_
private

Definition at line 221 of file EcalHitMaker.h.

Referenced by buildGeometry(), fastInsideCell(), and getPads().

◆ ny_

unsigned EcalHitMaker::ny_
private

Definition at line 221 of file EcalHitMaker.h.

Referenced by buildGeometry(), fastInsideCell(), and getPads().

◆ onEcal_

int EcalHitMaker::onEcal_
private

Definition at line 216 of file EcalHitMaker.h.

Referenced by cellLine(), getHits(), and setTrackParameters().

◆ outsideWindowEnergy_

double EcalHitMaker::outsideWindowEnergy_
private

Definition at line 209 of file EcalHitMaker.h.

Referenced by addHit(), addHitDepth(), and EcalHitMaker().

◆ padsatdepth_

std::vector<CrystalPad> EcalHitMaker::padsatdepth_
private

◆ phisize_

unsigned EcalHitMaker::phisize_
private

Definition at line 240 of file EcalHitMaker.h.

Referenced by buildGeometry(), EcalHitMaker(), and reorganizePads().

◆ pivot_

Crystal EcalHitMaker::pivot_
private

Definition at line 212 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), and getPads().

◆ plan_

Plane3D EcalHitMaker::plan_
private

Definition at line 261 of file EcalHitMaker.h.

Referenced by getPads().

◆ pulledPadProbability_

double EcalHitMaker::pulledPadProbability_
private

Definition at line 264 of file EcalHitMaker.h.

Referenced by EcalHitMaker(), getPads(), and setPulledPadSurvivalProbability().

◆ radiusCorrectionFactor_

double EcalHitMaker::radiusCorrectionFactor_
private

Definition at line 246 of file EcalHitMaker.h.

Referenced by getPads(), and setRadiusFactor().

◆ radiusFactor_

double EcalHitMaker::radiusFactor_
private

Definition at line 248 of file EcalHitMaker.h.

Referenced by addHit(), addHitDepth(), and getPads().

◆ random

const RandomEngineAndDistribution* EcalHitMaker::random
private

Definition at line 290 of file EcalHitMaker.h.

Referenced by addHit().

◆ rearleakage_

double EcalHitMaker::rearleakage_
private

Definition at line 208 of file EcalHitMaker.h.

Referenced by addHitDepth(), and EcalHitMaker().

◆ regionOfInterest_

std::vector<Crystal> EcalHitMaker::regionOfInterest_
private

◆ segments_

std::vector<CaloSegment> EcalHitMaker::segments_
private

Definition at line 276 of file EcalHitMaker.h.

Referenced by buildSegments(), getPads(), getSegments(), and setTrackParameters().

◆ simulatePreshower_

bool EcalHitMaker::simulatePreshower_
private

Definition at line 256 of file EcalHitMaker.h.

Referenced by cellLine(), EcalHitMaker(), and setPreshowerPresent().

◆ sizex_

double EcalHitMaker::sizex_
private

Definition at line 268 of file EcalHitMaker.h.

Referenced by convertIntegerCoordinates(), and getPads().

◆ sizey_

double EcalHitMaker::sizey_
private

Definition at line 268 of file EcalHitMaker.h.

Referenced by convertIntegerCoordinates(), and getPads().

◆ totalL0_

double EcalHitMaker::totalL0_
private

Definition at line 192 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and totalL0().

◆ totalX0_

double EcalHitMaker::totalX0_
private

Definition at line 191 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and totalX0().

◆ truncatedGrid_

bool EcalHitMaker::truncatedGrid_
private

Definition at line 242 of file EcalHitMaker.h.

Referenced by EcalHitMaker().

◆ validPads_

std::vector<bool> EcalHitMaker::validPads_
private

◆ X0depthoffset_

double EcalHitMaker::X0depthoffset_
private

Definition at line 193 of file EcalHitMaker.h.

Referenced by addHitDepth(), EcalHitMaker(), getPads(), setTrackParameters(), and x0DepthOffset().

◆ X0ECAL_

double EcalHitMaker::X0ECAL_
private

Definition at line 197 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ecalTotalX0().

◆ X0EHGAP_

double EcalHitMaker::X0EHGAP_
private

Definition at line 198 of file EcalHitMaker.h.

Referenced by buildSegments(), ecalHcalGapTotalX0(), and EcalHitMaker().

◆ X0HCAL_

double EcalHitMaker::X0HCAL_
private

Definition at line 199 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and hcalTotalX0().

◆ X0PS1_

double EcalHitMaker::X0PS1_
private

Definition at line 194 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps1TotalX0().

◆ X0PS2_

double EcalHitMaker::X0PS2_
private

Definition at line 195 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps2TotalX0().

◆ X0PS2EE_

double EcalHitMaker::X0PS2EE_
private

Definition at line 196 of file EcalHitMaker.h.

Referenced by buildSegments(), EcalHitMaker(), and ps2eeTotalX0().

◆ xmax_

double EcalHitMaker::xmax_
private

Definition at line 222 of file EcalHitMaker.h.

Referenced by getPads().

◆ xmin_

double EcalHitMaker::xmin_
private

Definition at line 222 of file EcalHitMaker.h.

Referenced by convertIntegerCoordinates(), and getPads().

◆ ymax_

double EcalHitMaker::ymax_
private

Definition at line 222 of file EcalHitMaker.h.

Referenced by getPads().

◆ ymin_

double EcalHitMaker::ymin_
private

Definition at line 222 of file EcalHitMaker.h.

Referenced by convertIntegerCoordinates(), and getPads().