CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromData Class Reference
Inheritance diagram for SiStripGainFromData:
ConditionDBWriter< SiStripApvGain > edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  isEqual
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiStripGainFromData (const edm::ParameterSet &)
 
 ~SiStripGainFromData () override=default
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void algoAnalyze (const edm::Event &, const edm::EventSetup &) override
 
void algoBeginJob (const edm::EventSetup &) override
 
void algoBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void algoEndJob () override
 
double ComputeChargeOverPath (const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
 
std::unique_ptr< SiStripApvGaingetNewObject () override
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
 
bool IsFarFromBorder (TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
 

Private Attributes

std::string AlgoMode
 
bool AllowSaturation
 
TH2F * APV_Charge
 
TH1F * APV_CumulGain
 
TH1F * APV_DetId
 
TH1F * APV_Eta
 
TH1F * APV_Gain
 
TH1F * APV_Id
 
TH2F * APV_Momentum
 
TH1F * APV_MPV
 
TH2F * APV_PathLength
 
TH1F * APV_PathLengthM
 
TH1F * APV_PrevGain
 
TH1F * APV_R
 
TH1F * APV_SubDet
 
TH1F * APV_Thickness
 
std::unordered_map< unsigned int, stAPVGain * > APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
int CalibrationLevel
 
TH1F * Charge_TEC
 
TH1F * Charge_TEC1
 
TH1F * Charge_TEC2
 
TH1F * Charge_TECM
 
TH1F * Charge_TECP
 
TH1F * Charge_TIB
 
TH1F * Charge_TID
 
TH1F * Charge_TIDM
 
TH1F * Charge_TIDP
 
TH1F * Charge_TOB
 
TH2F * Charge_Vs_Alpha
 
TH2F * Charge_Vs_Beta
 
TH2F * Charge_Vs_PathLength
 
TH2F * Charge_Vs_PathLength320
 
TH2F * Charge_Vs_PathLength500
 
TH2F * Charge_Vs_PathTEC
 
TH2F * Charge_Vs_PathTEC1
 
TH2F * Charge_Vs_PathTEC2
 
TH2F * Charge_Vs_PathTIB
 
TH2F * Charge_Vs_PathTID
 
TH2F * Charge_Vs_PathTOB
 
TH2F * Charge_Vs_TransversAngle
 
bool CheckIfFileExist
 
bool CheckLocalAngle
 
DQMStoredqmStore_
 
unsigned int EEvent
 
TH2F * Error_Vs_Entries
 
TH2F * Error_Vs_Eta
 
TH2F * Error_Vs_MPV
 
TH2F * Error_Vs_Phi
 
unsigned int ERun
 
TimeValue_t ETimestamp
 
bool FirstSetOfConstants
 
TH1F * FWHM_Vs_PathLength
 
TH1F * FWHM_Vs_PathLength320
 
TH1F * FWHM_Vs_PathLength500
 
edm::ESGetToken< SiStripGain, SiStripGainRcdgainToken_
 
TH1F * HChi2OverNDF
 
TH1F * HFirstStrip
 
TH2F * HitLocalPosition
 
TH2F * HitLocalPositionBefCut
 
TH1F * HTrackChi2OverNDF
 
TH1F * HTrackHits
 
const edm::EventiEvent_
 
const edm::EventSetupiSetup_
 
TH1F * JobInfo
 
double MaxChi2OverNDF
 
double MaxMPVError
 
unsigned int MaxNrStrips
 
double MaxTrackChiOverNdf
 
double MaxTrackEta
 
double MaxTrackMomentum
 
unsigned int MinNrEntries
 
double MinTrackEta
 
unsigned int MinTrackHits
 
double MinTrackMomentum
 
TH1F * MPV_Vs_Alpha
 
TH1F * MPV_Vs_Beta
 
TH2F * MPV_Vs_Eta
 
TH2F * MPV_Vs_EtaTEC
 
TH2F * MPV_Vs_EtaTEC1
 
TH2F * MPV_Vs_EtaTEC2
 
TH2F * MPV_Vs_EtaTIB
 
TH2F * MPV_Vs_EtaTID
 
TH2F * MPV_Vs_EtaTOB
 
TH1F * MPV_Vs_PathLength
 
TH1F * MPV_Vs_PathLength320
 
TH1F * MPV_Vs_PathLength500
 
TH1F * MPV_Vs_PathTEC
 
TH1F * MPV_Vs_PathTEC1
 
TH1F * MPV_Vs_PathTEC2
 
TH1F * MPV_Vs_PathTIB
 
TH1F * MPV_Vs_PathTID
 
TH1F * MPV_Vs_PathTOB
 
TH2F * MPV_Vs_Phi
 
TH2F * MPV_Vs_PhiTEC
 
TH2F * MPV_Vs_PhiTEC1
 
TH2F * MPV_Vs_PhiTEC2
 
TH2F * MPV_Vs_PhiTIB
 
TH2F * MPV_Vs_PhiTID
 
TH2F * MPV_Vs_PhiTOB
 
TH2F * MPV_Vs_R
 
TH1F * MPV_Vs_TransversAngle
 
TH1F * MPVs
 
TH1F * MPVs320
 
TH1F * MPVs500
 
unsigned int NEvent
 
TH1F * NHighStripInCluster
 
TH2F * NoMPV_Vs_EtaPhi
 
TH1F * NSatStripInCluster
 
TH2F * NStrips_Vs_Alpha
 
TH2F * NStrips_Vs_Beta
 
TH2F * NStrips_Vs_TransversAngle
 
TH1F * NumberOfEntriesByAPV
 
std::string OutputGains
 
std::string OutputHistos
 
unsigned int SEvent
 
unsigned int SRun
 
TimeValue_t STimestamp
 
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecordtkGeomToken_
 
MonitorElementtmp
 
TH2F * Tracks_P_Vs_Eta
 
TH2F * Tracks_Pt_Vs_Eta
 
std::string TrajToTrackLabel
 
std::string TrajToTrackProducer
 
edm::ESGetToken< TrackerTopology, TrackerTopologyRcdtTopoToken_
 
bool Validation
 
vector< string > VInputFiles
 

Additional Inherited Members

- Static Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripApvGain >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 64 of file SiStripGainFromData.cc.

Member Typedef Documentation

◆ DQMStore

Definition at line 67 of file SiStripGainFromData.cc.

◆ MonitorElement

Definition at line 66 of file SiStripGainFromData.cc.

Constructor & Destructor Documentation

◆ SiStripGainFromData()

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

Definition at line 278 of file SiStripGainFromData.cc.

References AlgoMode, AllowSaturation, CalibrationLevel, CheckIfFileExist, CheckLocalAngle, dqmStore_, FirstSetOfConstants, gainToken_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MaxChi2OverNDF, MaxMPVError, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, MinNrEntries, MinTrackEta, MinTrackHits, MinTrackMomentum, Utilities::operator, OutputGains, OutputHistos, AlCaHLTBitMon_QueryRunRegistry::string, tkGeomToken_, TrajToTrackLabel, TrajToTrackProducer, tTopoToken_, Validation, and VInputFiles.

280  AlgoMode = iConfig.getParameter<std::string>("AlgoMode");
281 
282  OutputGains = iConfig.getParameter<std::string>("OutputGains");
283  OutputHistos = iConfig.getParameter<std::string>("OutputHistos");
284 
285  TrajToTrackProducer = iConfig.getParameter<std::string>("TrajToTrackProducer");
286  TrajToTrackLabel = iConfig.getParameter<std::string>("TrajToTrackLabel");
287 
288  CheckLocalAngle = iConfig.getUntrackedParameter<bool>("checkLocalAngle", false);
289  MinNrEntries = iConfig.getUntrackedParameter<unsigned>("minNrEntries", 20);
290  MaxMPVError = iConfig.getUntrackedParameter<double>("maxMPVError", 500.0);
291  MaxChi2OverNDF = iConfig.getUntrackedParameter<double>("maxChi2OverNDF", 5.0);
292  MinTrackMomentum = iConfig.getUntrackedParameter<double>("minTrackMomentum", 3.0);
293  MaxTrackMomentum = iConfig.getUntrackedParameter<double>("maxTrackMomentum", 99999.0);
294  MinTrackEta = iConfig.getUntrackedParameter<double>("minTrackEta", -5.0);
295  MaxTrackEta = iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0);
296  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips", 2);
297  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits", 8);
298  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double>("MaxTrackChiOverNdf", 3);
299  AllowSaturation = iConfig.getUntrackedParameter<bool>("AllowSaturation", false);
300  FirstSetOfConstants = iConfig.getUntrackedParameter<bool>("FirstSetOfConstants", true);
301  Validation = iConfig.getUntrackedParameter<bool>("Validation", false);
302  CheckIfFileExist = iConfig.getUntrackedParameter<bool>("CheckIfFileExist", false);
303 
304  CalibrationLevel = iConfig.getUntrackedParameter<int>("CalibrationLevel", 0);
305 
306  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
307  VInputFiles = iConfig.getParameter<vector<string> >("VInputFiles");
308 
310 
311  tTopoToken_ = esConsumes<edm::Transition::BeginRun>();
312  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
313  gainToken_ = esConsumes<edm::Transition::BeginRun>();
314 
315  //if( OutputHistos!="" )
316  // dqmStore_->open(OutputHistos.c_str(), true);
317 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
T getUntrackedParameter(std::string const &, T const &) const
vector< string > VInputFiles

◆ ~SiStripGainFromData()

SiStripGainFromData::~SiStripGainFromData ( )
overridedefault

Member Function Documentation

◆ algoAnalyze()

void SiStripGainFromData::algoAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1136 of file SiStripGainFromData.cc.

References AlgoMode, edm::AssociationMap< Tag >::begin(), Trajectory::chiSquared(), SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), ComputeChargeOverPath(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, EEvent, edm::AssociationMap< Tag >::end(), ERun, ETimestamp, Trajectory::foundHits(), HTrackChi2OverNDF, HTrackHits, iEvent, iEvent_, createfilelist::int, TrajectoryStateOnSurface::isValid(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, Trajectory::measurements(), MinTrackEta, MinTrackHits, MinTrackMomentum, SiStripMatchedRecHit2D::monoCluster(), ndof, NEvent, edm::Handle< T >::product(), Trajectory::recHits(), SEvent, SRun, SiStripMatchedRecHit2D::stereoCluster(), STimestamp, HLT_2023v12_cff::track, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, TrajToTrackLabel, and TrajToTrackProducer.

1136  {
1137  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
1138  return;
1139 
1140  if (NEvent == 0) {
1141  SRun = iEvent.id().run();
1142  SEvent = iEvent.id().event();
1143  STimestamp = iEvent.time().value();
1144  }
1145  ERun = iEvent.id().run();
1146  EEvent = iEvent.id().event();
1147  ETimestamp = iEvent.time().value();
1148  NEvent++;
1149 
1150  iEvent_ = &iEvent;
1151 
1152  Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
1153  iEvent.getByLabel(TrajToTrackProducer, TrajToTrackLabel, trajTrackAssociationHandle);
1154  const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product();
1155 
1156  for (TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it != TrajToTrackMap.end(); ++it) {
1157  const Track track = *it->val;
1158  const Trajectory traj = *it->key;
1159 
1160  if (track.p() < MinTrackMomentum || track.p() > MaxTrackMomentum || track.eta() < MinTrackEta ||
1161  track.eta() > MaxTrackEta)
1162  continue;
1163 
1164  Tracks_Pt_Vs_Eta->Fill(fabs(track.eta()), track.pt());
1165  Tracks_P_Vs_Eta->Fill(fabs(track.eta()), track.p());
1166 
1167  //BEGIN TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1168  int ndof = 0;
1169  const Trajectory::RecHitContainer transRecHits = traj.recHits();
1170 
1171  for (Trajectory::RecHitContainer::const_iterator rechit = transRecHits.begin(); rechit != transRecHits.end();
1172  ++rechit)
1173  if ((*rechit)->isValid())
1174  ndof += (*rechit)->dimension();
1175  ndof -= 5;
1176  //END TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1177 
1178  HTrackChi2OverNDF->Fill(traj.chiSquared() / ndof);
1179  if (traj.chiSquared() / ndof > MaxTrackChiOverNdf)
1180  continue;
1181 
1182  vector<TrajectoryMeasurement> measurements = traj.measurements();
1183  HTrackHits->Fill(traj.foundHits());
1184  if (traj.foundHits() < (int)MinTrackHits)
1185  continue;
1186  /*
1187  //BEGIN TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1188  int NMatchedHit = 0;
1189  for(vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){
1190  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1191  if( !trajState.isValid() ) continue;
1192  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1193  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1194  if(sistripmatchedhit)NMatchedHit++;
1195 // NMatchedHit++;
1196 
1197  }
1198  //END TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1199 
1200  if(NMatchedHit<2){
1201  printf("NOT ENOUGH MATCHED RECHITS : %i\n",NMatchedHit);
1202  continue;
1203  }
1204 */
1205 
1206  for (vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin();
1207  measurement_it != measurements.end();
1208  measurement_it++) {
1209  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1210  if (!trajState.isValid())
1211  continue;
1212 
1213  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1214  const SiStripRecHit1D* sistripsimple1dhit = dynamic_cast<const SiStripRecHit1D*>(hit);
1215  const SiStripRecHit2D* sistripsimplehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1216  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1217 
1218  if (sistripsimplehit) {
1220  (sistripsimplehit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1221  } else if (sistripmatchedhit) {
1222  ComputeChargeOverPath(&sistripmatchedhit->monoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1224  &sistripmatchedhit->stereoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1225  } else if (sistripsimple1dhit) {
1227  (sistripsimple1dhit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1228  } else {
1229  }
1230  }
1231  }
1232 }
T const * product() const
Definition: Handle.h:70
float chiSquared() const
Definition: Trajectory.h:241
int foundHits() const
Definition: Trajectory.h:206
ClusterRef cluster() const
DataContainer const & measurements() const
Definition: Trajectory.h:178
const_iterator end() const
last iterator over the map (read only)
int iEvent
Definition: GenABIO.cc:224
SiStripCluster const & monoCluster() const
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
double ComputeChargeOverPath(const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
SiStripCluster const & stereoCluster() const
const_iterator begin() const
first iterator over the map (read only)
ClusterRef cluster() const
const edm::Event * iEvent_

◆ algoBeginJob()

void SiStripGainFromData::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 319 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_DetId, APV_Eta, APV_Gain, APV_Id, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, APV_PrevGain, APV_R, APV_SubDet, APV_Thickness, APVsColl, APVsCollOrdered, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, runTheMatrix::const, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, ETimestamp, beamvalidation::exit(), FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, gainToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), dqm::legacy::MonitorElement::getTH1F(), dqm::legacy::MonitorElement::getTH2F(), HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, mps_fire::i, iSetup_, dqmiolumiharvest::j, JobInfo, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, StripTopology::nstrips(), NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, VtxSmearedParameters_cfi::Phi, dttmaxenums::R, DetId::rawId(), SEvent, SRun, STimestamp, ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecSide(), StripSubdetector::TIB, StripSubdetector::TID, TrackerTopology::tidSide(), tkGeomToken_, tmp, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and tTopoToken_.

319  {
320  const TrackerTopology* const tTopo = &iSetup.getData(tTopoToken_);
321 
322  iSetup_ = &iSetup;
323 
324  // TH1::AddDirectory(kTRUE);
325 
326  tmp = dqmStore_->book1D("JobInfo", "JobInfo", 20, 0, 20);
327  JobInfo = tmp->getTH1F();
328 
329  tmp = dqmStore_->book1D("APV_DetId", "APV_DetId", 72785, 0, 72784);
330  APV_DetId = tmp->getTH1F();
331  tmp = dqmStore_->book1D("APV_Id", "APV_Id", 72785, 0, 72784);
332  APV_Id = tmp->getTH1F();
333  tmp = dqmStore_->book1D("APV_Eta", "APV_Eta", 72785, 0, 72784);
334  APV_Eta = tmp->getTH1F();
335  tmp = dqmStore_->book1D("APV_R", "APV_R", 72785, 0, 72784);
336  APV_R = tmp->getTH1F();
337  tmp = dqmStore_->book1D("APV_SubDet", "APV_SubDet", 72785, 0, 72784);
338  APV_SubDet = tmp->getTH1F();
339  tmp = dqmStore_->book2D("APV_Momentum", "APV_Momentum", 72785, 0, 72784, 50, 0, 200);
340  APV_Momentum = tmp->getTH2F();
341  tmp = dqmStore_->book2D("APV_Charge", "APV_Charge", 72785, 0, 72784, 1000, 0, 2000);
342  APV_Charge = tmp->getTH2F();
343  tmp = dqmStore_->book2D("APV_PathLength", "APV_PathLength", 72785, 0, 72784, 100, 0.2, 1.4);
345  tmp = dqmStore_->book1D("APV_PathLengthM", "APV_PathLengthM", 72785, 0, 72784);
347  tmp = dqmStore_->book1D("APV_MPV", "APV_MPV", 72785, 0, 72784);
348  APV_MPV = tmp->getTH1F();
349  tmp = dqmStore_->book1D("APV_Gain", "APV_Gain", 72785, 0, 72784);
350  APV_Gain = tmp->getTH1F();
351  tmp = dqmStore_->book1D("APV_PrevGain", "APV_PrevGain", 72785, 0, 72784);
352  APV_PrevGain = tmp->getTH1F();
353  tmp = dqmStore_->book1D("APV_CumulGain", "APV_CumulGain", 72785, 0, 72784);
355  tmp = dqmStore_->book1D("APV_Thickness", "APV_Thicknes", 72785, 0, 72784);
357 
358  tmp = dqmStore_->book2D("Tracks_P_Vs_Eta", "Tracks_P_Vs_Eta", 30, 0, 3, 50, 0, 200);
360  tmp = dqmStore_->book2D("Tracks_Pt_Vs_Eta", "Tracks_Pt_Vs_Eta", 30, 0, 3, 50, 0, 200);
362 
363  tmp = dqmStore_->book2D("Charge_Vs_PathTIB", "Charge_Vs_PathTIB", 100, 0.2, 1.4, 500, 0, 2000);
365  tmp = dqmStore_->book2D("Charge_Vs_PathTID", "Charge_Vs_PathTID", 100, 0.2, 1.4, 500, 0, 2000);
367  tmp = dqmStore_->book2D("Charge_Vs_PathTOB", "Charge_Vs_PathTOB", 100, 0.2, 1.4, 500, 0, 2000);
369  tmp = dqmStore_->book2D("Charge_Vs_PathTEC", "Charge_Vs_PathTEC", 100, 0.2, 1.4, 500, 0, 2000);
371  tmp = dqmStore_->book2D("Charge_Vs_PathTEC1", "Charge_Vs_PathTEC1", 100, 0.2, 1.4, 500, 0, 2000);
373  tmp = dqmStore_->book2D("Charge_Vs_PathTEC2", "Charge_Vs_PathTEC2", 100, 0.2, 1.4, 500, 0, 2000);
375 
376  tmp = dqmStore_->book1D("Charge_TIB", "Charge_TIB", 1000, 0, 2000);
377  Charge_TIB = tmp->getTH1F();
378  tmp = dqmStore_->book1D("Charge_TID", "Charge_TID", 1000, 0, 2000);
379  Charge_TID = tmp->getTH1F();
380  tmp = dqmStore_->book1D("Charge_TID+", "Charge_TID+", 1000, 0, 2000);
381  Charge_TIDP = tmp->getTH1F();
382  tmp = dqmStore_->book1D("Charge_TID-", "Charge_TID-", 1000, 0, 2000);
383  Charge_TIDM = tmp->getTH1F();
384  tmp = dqmStore_->book1D("Charge_TOB", "Charge_TOB", 1000, 0, 2000);
385  Charge_TOB = tmp->getTH1F();
386  tmp = dqmStore_->book1D("Charge_TEC", "Charge_TEC", 1000, 0, 2000);
387  Charge_TEC = tmp->getTH1F();
388  tmp = dqmStore_->book1D("Charge_TEC1", "Charge_TEC1", 1000, 0, 2000);
389  Charge_TEC1 = tmp->getTH1F();
390  tmp = dqmStore_->book1D("Charge_TEC2", "Charge_TEC2", 1000, 0, 2000);
391  Charge_TEC2 = tmp->getTH1F();
392  tmp = dqmStore_->book1D("Charge_TEC+", "Charge_TEC+", 1000, 0, 2000);
393  Charge_TECP = tmp->getTH1F();
394  tmp = dqmStore_->book1D("Charge_TEC-", "Charge_TEC-", 1000, 0, 2000);
395  Charge_TECM = tmp->getTH1F();
396 
397  /*
398  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS1", "Charge_Vs_PathLength_CS1" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS1 = tmp->getTH2F();
399  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS2", "Charge_Vs_PathLength_CS2" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS2 = tmp->getTH2F();
400  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS3", "Charge_Vs_PathLength_CS3" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS3 = tmp->getTH2F();
401  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS4", "Charge_Vs_PathLength_CS4" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS4 = tmp->getTH2F();
402  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS5", "Charge_Vs_PathLength_CS5" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS5 = tmp->getTH2F();
403 */
404  tmp = dqmStore_->book2D("Charge_Vs_PathLength", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
406  tmp = dqmStore_->book2D("Charge_Vs_PathLength320", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
408  tmp = dqmStore_->book2D("Charge_Vs_PathLength500", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
410 
411  tmp = dqmStore_->book2D("Charge_Vs_TransversAngle", "Charge_Vs_TransversAngle", 220, -20, 200, 500, 0, 2000);
413  tmp = dqmStore_->book2D("Charge_Vs_Alpha", "Charge_Vs_Alpha", 220, -20, 200, 500, 0, 2000);
415  tmp = dqmStore_->book2D("Charge_Vs_Beta", "Charge_Vs_Beta", 220, -20, 200, 500, 0, 2000);
417 
418  tmp = dqmStore_->book2D("NStrips_Vs_TransversAngle", "NStrips_Vs_TransversAngle", 220, -20, 200, 10, 0, 10);
420  tmp = dqmStore_->book2D("NStrips_Vs_Alpha", "NStrips_Vs_Alpha", 220, -20, 200, 10, 0, 10);
422  tmp = dqmStore_->book2D("NStrips_Vs_Beta", "NStrips_Vs_Beta", 220, -20, 200, 10, 0, 10);
424  tmp = dqmStore_->book1D("NHighStripInCluster", "NHighStripInCluster", 15, 0, 14);
426  tmp = dqmStore_->book1D("NSatStripInCluster", "NSatStripInCluster", 50, 0, 50);
428 
429  tmp = dqmStore_->book1D("TrackChi2OverNDF", "TrackChi2OverNDF", 500, 0, 10);
431  tmp = dqmStore_->book1D("TrackHits", "TrackHits", 40, 0, 40);
432  HTrackHits = tmp->getTH1F();
433 
434  tmp = dqmStore_->book1D("FirstStrip", "FirstStrip", 800, 0, 800);
435  HFirstStrip = tmp->getTH1F();
436 
437  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
438  tmp = dqmStore_->book2D("MPV_Vs_EtaTIB", "MPV_Vs_EtaTIB", 50, -3.0, 3.0, 300, 0, 600);
440  tmp = dqmStore_->book2D("MPV_Vs_EtaTID", "MPV_Vs_EtaTID", 50, -3.0, 3.0, 300, 0, 600);
442  tmp = dqmStore_->book2D("MPV_Vs_EtaTOB", "MPV_Vs_EtaTOB", 50, -3.0, 3.0, 300, 0, 600);
444  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC", "MPV_Vs_EtaTEC", 50, -3.0, 3.0, 300, 0, 600);
446  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC1", "MPV_Vs_EtaTEC1", 50, -3.0, 3.0, 300, 0, 600);
448  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC2", "MPV_Vs_EtaTEC2", 50, -3.0, 3.0, 300, 0, 600);
450 
451  tmp = dqmStore_->book2D("MPV_Vs_PhiTIB", "MPV_Vs_PhiTIB", 50, -3.2, 3.2, 300, 0, 600);
453  tmp = dqmStore_->book2D("MPV_Vs_PhiTID", "MPV_Vs_PhiTID", 50, -3.2, 3.2, 300, 0, 600);
455  tmp = dqmStore_->book2D("MPV_Vs_PhiTOB", "MPV_Vs_PhiTOB", 50, -3.2, 3.2, 300, 0, 600);
457  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC", "MPV_Vs_PhiTEC", 50, -3.2, 3.2, 300, 0, 600);
459  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC1", "MPV_Vs_PhiTEC1", 50, -3.2, 3.2, 300, 0, 600);
461  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC2", "MPV_Vs_PhiTEC2", 50, -3.2, 3.2, 300, 0, 600);
463 
464  tmp = dqmStore_->book1D("MPV_Vs_PathTIB", "MPV_Vs_PathTIB", 100, 0.2, 1.4);
466  tmp = dqmStore_->book1D("MPV_Vs_PathTID", "MPV_Vs_PathTID", 100, 0.2, 1.4);
468  tmp = dqmStore_->book1D("MPV_Vs_PathTOB", "MPV_Vs_PathTOB", 100, 0.2, 1.4);
470  tmp = dqmStore_->book1D("MPV_Vs_PathTEC", "MPV_Vs_PathTEC", 100, 0.2, 1.4);
472  tmp = dqmStore_->book1D("MPV_Vs_PathTEC1", "MPV_Vs_PathTEC1", 100, 0.2, 1.4);
474  tmp = dqmStore_->book1D("MPV_Vs_PathTEC2", "MPV_Vs_PathTEC2", 100, 0.2, 1.4);
476 
477  tmp = dqmStore_->book2D("MPV_Vs_Phi", "MPV_Vs_Phi", 50, -3.2, 3.2, 300, 0, 600);
478  MPV_Vs_Phi = tmp->getTH2F();
479  tmp = dqmStore_->book2D("MPV_Vs_Eta", "MPV_Vs_Eta", 50, -3.0, 3.0, 300, 0, 600);
480  MPV_Vs_Eta = tmp->getTH2F();
481  tmp = dqmStore_->book2D("MPV_Vs_R", "MPV_Vs_R", 150, 0.0, 150.0, 300, 0, 600);
482  MPV_Vs_R = tmp->getTH2F();
483  /*
484  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS1" , "MPV_Vs_PathLength_CS1" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS1 = tmp->getTH1F();
485  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS2" , "MPV_Vs_PathLength_CS2" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS2 = tmp->getTH1F();
486  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS3" , "MPV_Vs_PathLength_CS3" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS3 = tmp->getTH1F();
487  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS4" , "MPV_Vs_PathLength_CS4" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS4 = tmp->getTH1F();
488  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS5" , "MPV_Vs_PathLength_CS5" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS5 = tmp->getTH1F();
489 
490  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS1" , "FWHM_Vs_PathLength_CS1", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS1 = tmp->getTH1F();
491  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS2" , "FWHM_Vs_PathLength_CS2", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS2 = tmp->getTH1F();
492  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS3" , "FWHM_Vs_PathLength_CS3", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS3 = tmp->getTH1F();
493  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS4" , "FWHM_Vs_PathLength_CS4", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS4 = tmp->getTH1F();
494  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS5" , "FWHM_Vs_PathLength_CS5", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS5 = tmp->getTH1F();
495 */
496  tmp = dqmStore_->book1D("MPV_Vs_PathLength", "MPV_Vs_PathLength", 100, 0.2, 1.4);
498  tmp = dqmStore_->book1D("MPV_Vs_PathLength320", "MPV_Vs_PathLength", 100, 0.2, 1.4);
500  tmp = dqmStore_->book1D("MPV_Vs_PathLength500", "MPV_Vs_PathLength", 100, 0.2, 1.4);
502 
503  tmp = dqmStore_->book1D("FWHM_Vs_PathLength", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
505  tmp = dqmStore_->book1D("FWHM_Vs_PathLength320", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
507  tmp = dqmStore_->book1D("FWHM_Vs_PathLength500", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
509 
510  tmp = dqmStore_->book1D("MPV_Vs_TransversAngle", "MPV_Vs_TransversAngle", 220, -20, 200);
512  tmp = dqmStore_->book1D("MPV_Vs_Alpha", "MPV_Vs_Alpha", 220, -20, 200);
513  MPV_Vs_Alpha = tmp->getTH1F();
514  tmp = dqmStore_->book1D("MPV_Vs_Beta", "MPV_Vs_Beta", 220, -20, 200);
515  MPV_Vs_Beta = tmp->getTH1F();
516 
517  tmp = dqmStore_->book2D("Error_Vs_MPV", "Error_Vs_MPV", 600, 0, 600, 100, 0, 50);
518  Error_Vs_MPV = tmp->getTH2F();
519  tmp = dqmStore_->book2D("Error_Vs_Entries", "Error_Vs_Entries", 500, 0, 10000, 100, 0, 50);
521  tmp = dqmStore_->book2D("Error_Vs_Eta", "Error_Vs_Eta", 50, -3.0, 3.0, 100, 0, 50);
522  Error_Vs_Eta = tmp->getTH2F();
523  tmp = dqmStore_->book2D("Error_Vs_Phi", "Error_Vs_Phi", 50, -3.2, 3.2, 100, 0, 50);
524  Error_Vs_Phi = tmp->getTH2F();
525 
526  tmp = dqmStore_->book2D("NoMPV_Vs_EtaPhi", "NoMPV_Vs_EtaPhi", 50, -3.0, 3.0, 50, -3.2, 3.2);
528 
529  tmp = dqmStore_->book1D("NumberOfEntriesByAPV", "NumberOfEntriesByAPV", 1000, 0, 10000);
531  tmp = dqmStore_->book1D("Chi2OverNDF", "Chi2OverNDF", 500, 0, 25);
532  HChi2OverNDF = tmp->getTH1F();
533 
534  tmp = dqmStore_->book1D("MPVs", "MPVs", 600, 0, 600);
535  MPVs = tmp->getTH1F();
536  tmp = dqmStore_->book1D("MPVs320", "MPVs320", 600, 0, 600);
537  MPVs320 = tmp->getTH1F();
538  tmp = dqmStore_->book1D("MPVs500", "MPVs500", 600, 0, 600);
539  MPVs500 = tmp->getTH1F();
540 
541  // MPV_vs_10RplusEta tmp = dqmStore_->book2D ("MPV_vs_10RplusEta","MPV_vs_10RplusEta", 48000,0,2400, 800,100,500);
542  }
543 
544  gROOT->cd();
545 
546  auto const& Det = iSetup.getData(tkGeomToken_).dets();
547 
548  // if(strcmp(AlgoMode.c_str(),"MultiJob")!=0 && !FirstSetOfConstants){
549  if (!iSetup.getHandle(gainToken_)) {
550  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
551  exit(0);
552  }
553  // }
554 
555  unsigned int Id = 0;
556  for (unsigned int i = 0; i < Det.size(); i++) {
557  DetId Detid = Det[i]->geographicalId();
558  int SubDet = Detid.subdetId();
559 
562  auto DetUnit = dynamic_cast<StripGeomDetUnit const*>(Det[i]);
563  if (!DetUnit)
564  continue;
565 
566  const StripTopology& Topo = DetUnit->specificTopology();
567  unsigned int NAPV = Topo.nstrips() / 128;
568 
569  double Phi = DetUnit->position().basicVector().phi();
570  double Eta = DetUnit->position().basicVector().eta();
571  double R = DetUnit->position().basicVector().transverse();
572  double Thick = DetUnit->surface().bounds().thickness();
573 
574  for (unsigned int j = 0; j < NAPV; j++) {
575  stAPVGain* APV = new stAPVGain;
576  APV->Index = Id;
577  APV->DetId = Detid.rawId();
578  APV->APVId = j;
579  APV->SubDet = SubDet;
580  APV->FitMPV = -1;
581  APV->Gain = -1;
582  APV->PreviousGain = 1;
583  APV->Eta = Eta;
584  APV->Phi = Phi;
585  APV->R = R;
586  APV->Thickness = Thick;
587  APV->Side = 0;
588 
589  if (SubDet == StripSubdetector::TID) {
590  APV->Side = tTopo->tidSide(Detid);
591  } else if (SubDet == StripSubdetector::TEC) {
592  APV->Side = tTopo->tecSide(Detid);
593  }
594 
595  APVsCollOrdered.push_back(APV);
596  APVsColl[(APV->DetId << 3) | APV->APVId] = APV;
597  Id++;
598 
599  APV_DetId->Fill(Id, APV->DetId);
600  APV_Id->Fill(Id, APV->APVId);
601  APV_Eta->Fill(Id, APV->Eta);
602  APV_R->Fill(Id, APV->R);
603  APV_SubDet->Fill(Id, APV->SubDet);
604  APV_Thickness->Fill(Id, APV->Thickness);
605  }
606  }
607  }
608 
609  NEvent = 0;
610  SRun = 0;
611  SEvent = 0;
612  STimestamp = 0;
613  ERun = 0;
614  EEvent = 0;
615  ETimestamp = 0;
616 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
static constexpr auto TEC
virtual int nstrips() const =0
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< stAPVGain * > APVsCollOrdered
unsigned int tidSide(const DetId &id) const
const edm::EventSetup * iSetup_
virtual TH2F * getTH2F() const
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int tecSide(const DetId &id) const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
Definition: DetId.h:17
static constexpr auto TIB
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
virtual TH1F * getTH1F() const
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
static constexpr auto TID
def exit(msg="")

◆ algoBeginRun()

void SiStripGainFromData::algoBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1111 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_PrevGain, APVsCollOrdered, beamvalidation::exit(), FirstSetOfConstants, gainToken_, edm::EventSetup::getHandle(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and Validation.

1111  {
1112  if ((strcmp(AlgoMode.c_str(), "MultiJob") != 0 && !FirstSetOfConstants) || Validation) {
1113  const auto gainHandle = iSetup.getHandle(gainToken_);
1114  if (!gainHandle.isValid()) {
1115  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
1116  exit(0);
1117  }
1118 
1119  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1120  stAPVGain* APV = *it;
1121 
1122  if (gainHandle.isValid()) {
1123  SiStripApvGain::Range detGainRange = gainHandle->getRange(APV->DetId);
1124  APV->PreviousGain = *(detGainRange.first + APV->APVId);
1125  // APV_PrevGain->Fill(APV->Index,APV->PreviousGain);
1126  APV_PrevGain->SetBinContent(APV_PrevGain->GetXaxis()->FindBin(APV->Index), APV->PreviousGain);
1127  if (APV->PreviousGain < 0)
1128  APV->PreviousGain = 1;
1129  } else {
1130  printf("GAIN HANDLE IS NOT VALID\n");
1131  }
1132  }
1133  }
1134 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
std::vector< stAPVGain * > APVsCollOrdered
std::pair< ContainerIterator, ContainerIterator > Range
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
def exit(msg="")

◆ algoEndJob()

void SiStripGainFromData::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 618 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_Gain, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, stAPVGain::APVId, APVsColl, APVsCollOrdered, b, hcaldqm::constants::BAD, newFWLiteAna::bin, CalibrationLevel, dqm::implementation::DQMStore::cd(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, CheckIfFileExist, stAPVGain::DetId, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, f, geometryDiff::file, FirstSetOfConstants, FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, getPeakOfLandau(), hcaldqm::constants::GOOD, HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, Exhume::I, stAPVGain::Index, createfilelist::int, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, dqmiolumiharvest::j, JobInfo, MaxMPVError, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, OutputGains, OutputHistos, dqm::implementation::DQMStore::save(), SEvent, SRun, StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and VInputFiles.

618  {
619  unsigned int I = 0;
620 
621  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "Merge") == 0) {
622  TH1::AddDirectory(kTRUE);
623 
624  TFile* file = nullptr;
625  for (unsigned int f = 0; f < VInputFiles.size(); f++) {
626  printf("Loading New Input File : %s\n", VInputFiles[f].c_str());
627  if (CheckIfFileExist) {
628  FILE* doesFileExist = fopen(VInputFiles[f].c_str(), "r");
629  if (!doesFileExist) {
630  printf("File %s doesn't exist\n", VInputFiles[f].c_str());
631  continue;
632  } else {
633  fclose(doesFileExist);
634  }
635  }
636  file = new TFile(VInputFiles[f].c_str());
637  if (!file || file->IsZombie()) {
638  printf("### Bug With File %s\n### File will be skipped \n", VInputFiles[f].c_str());
639  continue;
640  }
641  APV_Charge->Add((TH1*)file->FindObjectAny("APV_Charge"), 1);
642  APV_Momentum->Add((TH1*)file->FindObjectAny("APV_Momentum"), 1);
643  APV_PathLength->Add((TH1*)file->FindObjectAny("APV_PathLength"), 1);
644 
645  Tracks_P_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_P_Vs_Eta"), 1);
646  Tracks_Pt_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_Pt_Vs_Eta"), 1);
647 
648  Charge_Vs_PathTIB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTIB"), 1);
649  Charge_Vs_PathTID->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTID"), 1);
650  Charge_Vs_PathTOB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTOB"), 1);
651  Charge_Vs_PathTEC->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC"), 1);
652  Charge_Vs_PathTEC1->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC1"), 1);
653  Charge_Vs_PathTEC2->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC2"), 1);
654 
655  HTrackChi2OverNDF->Add((TH1*)file->FindObjectAny("TrackChi2OverNDF"), 1);
656  HTrackHits->Add((TH1*)file->FindObjectAny("TrackHits"), 1);
657 
658  NHighStripInCluster->Add((TH1*)file->FindObjectAny("NHighStripInCluster"), 1);
659  NSatStripInCluster->Add((TH1*)file->FindObjectAny("NSatStripInCluster"), 1);
660  Charge_Vs_PathLength->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength"), 1);
661  Charge_Vs_PathLength320->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength320"), 1);
662  Charge_Vs_PathLength500->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength500"), 1);
663  Charge_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("Charge_Vs_TransversAngle"), 1);
664  NStrips_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("NStrips_Vs_TransversAngle"), 1);
665  Charge_Vs_Alpha->Add((TH1*)file->FindObjectAny("Charge_Vs_Alpha"), 1);
666  NStrips_Vs_Alpha->Add((TH1*)file->FindObjectAny("NStrips_Vs_Alpha"), 1);
667  HFirstStrip->Add((TH1*)file->FindObjectAny("FirstStrip"), 1);
668 
669  TH1F* JobInfo_tmp = (TH1F*)file->FindObjectAny("JobInfo");
670  NEvent += (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(1));
671  unsigned int tmp_SRun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(3));
672  unsigned int tmp_SEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(4));
673  unsigned int tmp_ERun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(6));
674  unsigned int tmp_EEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(7));
675 
676  if (SRun == 0)
677  SRun = tmp_SRun;
678 
679  if (tmp_SRun < SRun) {
680  SRun = tmp_SRun;
681  SEvent = tmp_SEvent;
682  } else if (tmp_SRun == SRun && tmp_SEvent < SEvent) {
683  SEvent = tmp_SEvent;
684  }
685 
686  if (tmp_ERun > ERun) {
687  ERun = tmp_ERun;
688  EEvent = tmp_EEvent;
689  } else if (tmp_ERun == ERun && tmp_EEvent > EEvent) {
690  EEvent = tmp_EEvent;
691  }
692 
693  printf("Deleting Current Input File\n");
694  file->Close();
695  delete file;
696  }
697  }
698 
699  JobInfo->Fill(1, NEvent);
700  JobInfo->Fill(3, SRun);
701  JobInfo->Fill(4, SEvent);
702  JobInfo->Fill(6, ERun);
703  JobInfo->Fill(7, EEvent);
704 
705  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
706  TH1D* Proj = nullptr;
707  double FitResults[5];
708  I = 0;
709  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
710  if (I % 3650 == 0)
711  printf("Fitting Histograms \t %6.2f%%\n", (100.0 * I) / APVsColl.size());
712  I++;
713  stAPVGain* APV = it->second;
714 
715  int bin = APV_Charge->GetXaxis()->FindBin(APV->Index);
716  Proj = APV_Charge->ProjectionY(" ", bin, bin, "e");
717  Proj = (TH1D*)Proj->Clone();
718  if (Proj == nullptr)
719  continue;
720 
721  // ADD PROJECTTIONS COMMING FROM THE SECOND APV IN THE PAIR
722  if (CalibrationLevel == 1) {
723  int SecondAPVId = APV->APVId;
724  if (SecondAPVId % 2 == 0) {
725  SecondAPVId = SecondAPVId + 1;
726  } else {
727  SecondAPVId = SecondAPVId - 1;
728  }
729  stAPVGain* APV2 = APVsColl[(APV->DetId << 3) | SecondAPVId];
730 
731  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
732  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
733  if (Proj2 != nullptr) {
734  Proj->Add(Proj2, 1);
735  }
736  } else if (CalibrationLevel > 1) {
737  // printf("%8i %i--> %4.0f + %4.0f\n",APV->DetId, APV->APVId, 0.0, Proj->GetEntries());
738  for (auto it2 = APVsColl.begin(); it2 != APVsColl.end(); it2++) {
739  stAPVGain* APV2 = it2->second;
740 
741  if (APV2->DetId != APV->DetId)
742  continue;
743  if (APV2->APVId == APV->APVId)
744  continue;
745 
746  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
747  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
748  if (Proj2 != nullptr) {
749  // printf("%8i %i--> %4.0f + %4.0f\n",APV2->DetId, APV2->APVId, Proj->GetEntries(), Proj2->GetEntries());
750  Proj->Add(Proj2, 1);
751  }
752  }
753  // printf("%8i %i--> %4.0f Full\n",APV->DetId, APV->APVId, Proj->GetEntries());
754  }
755 
756  //std::cout << "Proj->GetEntries(): " << Proj->GetEntries() << ", Proj->GetMean(): " << Proj->GetMean() << std::endl;
757 
758  getPeakOfLandau(Proj, FitResults);
759  APV->FitMPV = FitResults[0];
760  // printf("MPV = %f - %f\n",FitResults[0], FitResults[1]);
761  if (FitResults[0] != -0.5 && FitResults[1] < MaxMPVError) {
762  APV_MPV->Fill(APV->Index, APV->FitMPV);
763  MPVs->Fill(APV->FitMPV);
764  if (APV->Thickness < 0.04)
765  MPVs320->Fill(APV->FitMPV);
766  if (APV->Thickness > 0.04)
767  MPVs500->Fill(APV->FitMPV);
768 
769  MPV_Vs_R->Fill(APV->R, APV->FitMPV);
770  MPV_Vs_Eta->Fill(APV->Eta, APV->FitMPV);
771  if (APV->SubDet == StripSubdetector::TIB)
772  MPV_Vs_EtaTIB->Fill(APV->Eta, APV->FitMPV);
773  if (APV->SubDet == StripSubdetector::TID)
774  MPV_Vs_EtaTID->Fill(APV->Eta, APV->FitMPV);
775  if (APV->SubDet == StripSubdetector::TOB)
776  MPV_Vs_EtaTOB->Fill(APV->Eta, APV->FitMPV);
777  if (APV->SubDet == StripSubdetector::TEC) {
778  MPV_Vs_EtaTEC->Fill(APV->Eta, APV->FitMPV);
779  if (APV->Thickness < 0.04)
780  MPV_Vs_EtaTEC1->Fill(APV->Eta, APV->FitMPV);
781  if (APV->Thickness > 0.04)
782  MPV_Vs_EtaTEC2->Fill(APV->Eta, APV->FitMPV);
783  }
784  MPV_Vs_Phi->Fill(APV->Phi, APV->FitMPV);
785  if (APV->SubDet == StripSubdetector::TIB)
786  MPV_Vs_PhiTIB->Fill(APV->Phi, APV->FitMPV);
787  if (APV->SubDet == StripSubdetector::TID)
788  MPV_Vs_PhiTID->Fill(APV->Phi, APV->FitMPV);
789  if (APV->SubDet == StripSubdetector::TOB)
790  MPV_Vs_PhiTOB->Fill(APV->Phi, APV->FitMPV);
791  if (APV->SubDet == StripSubdetector::TEC) {
792  MPV_Vs_PhiTEC->Fill(APV->Phi, APV->FitMPV);
793  if (APV->Thickness < 0.04)
794  MPV_Vs_PhiTEC1->Fill(APV->Phi, APV->FitMPV);
795  if (APV->Thickness > 0.04)
796  MPV_Vs_PhiTEC2->Fill(APV->Phi, APV->FitMPV);
797  }
798 
799  if (APV->SubDet == StripSubdetector::TIB)
800  Charge_TIB->Add(Proj, 1);
801  if (APV->SubDet == StripSubdetector::TID) {
802  Charge_TID->Add(Proj, 1);
803  if (APV->Side == 1)
804  Charge_TIDM->Add(Proj, 1);
805  if (APV->Side == 2)
806  Charge_TIDP->Add(Proj, 1);
807  }
808  if (APV->SubDet == StripSubdetector::TOB)
809  Charge_TOB->Add(Proj, 1);
810  if (APV->SubDet == StripSubdetector::TEC) {
811  Charge_TEC->Add(Proj, 1);
812  if (APV->Thickness < 0.04)
813  Charge_TEC1->Add(Proj, 1);
814  if (APV->Thickness > 0.04)
815  Charge_TEC2->Add(Proj, 1);
816  if (APV->Side == 1)
817  Charge_TECM->Add(Proj, 1);
818  if (APV->Side == 2)
819  Charge_TECP->Add(Proj, 1);
820  }
821  }
822 
823  if (APV->SubDet == StripSubdetector::TIB)
824  Charge_TIB->Add(Proj, 1);
825  if (APV->SubDet == StripSubdetector::TID) {
826  Charge_TID->Add(Proj, 1);
827  if (APV->Side == 1)
828  Charge_TIDM->Add(Proj, 1);
829  if (APV->Side == 2)
830  Charge_TIDP->Add(Proj, 1);
831  }
832  if (APV->SubDet == StripSubdetector::TOB)
833  Charge_TOB->Add(Proj, 1);
834  if (APV->SubDet == StripSubdetector::TEC) {
835  Charge_TEC->Add(Proj, 1);
836  if (APV->Thickness < 0.04)
837  Charge_TEC1->Add(Proj, 1);
838  if (APV->Thickness > 0.04)
839  Charge_TEC2->Add(Proj, 1);
840  if (APV->Side == 1)
841  Charge_TECM->Add(Proj, 1);
842  if (APV->Side == 2)
843  Charge_TECP->Add(Proj, 1);
844  }
845 
846  if (FitResults[0] != -0.5) {
847  HChi2OverNDF->Fill(FitResults[4]);
848  Error_Vs_MPV->Fill(FitResults[0], FitResults[1]);
849  Error_Vs_Entries->Fill(Proj->GetEntries(), FitResults[1]);
850  Error_Vs_Eta->Fill(APV->Eta, FitResults[1]);
851  Error_Vs_Phi->Fill(APV->Phi, FitResults[1]);
852  }
853  NumberOfEntriesByAPV->Fill(Proj->GetEntries());
854  delete Proj;
855 
856  Proj = APV_PathLength->ProjectionY(" ", bin, bin, "e");
857  if (Proj == nullptr)
858  continue;
859 
860  APV_PathLengthM->SetBinContent(APV->Index, Proj->GetMean(1));
861  APV_PathLengthM->SetBinError(APV->Index, Proj->GetMeanError(1));
862  // delete Proj;
863  }
864 
865  unsigned int GOOD = 0;
866  unsigned int BAD = 0;
867  double MPVmean = 300.; //MPVs->GetMean();
868  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
869  stAPVGain* APV = it->second;
870  if (APV->FitMPV > 0) {
871  APV->Gain = APV->FitMPV / MPVmean; // APV->FitMPV;
872  GOOD++;
873  } else {
874  NoMPV_Vs_EtaPhi->Fill(APV->Eta, APV->Phi);
875  APV->Gain = 1;
876  BAD++;
877  }
878  if (APV->Gain <= 0)
879  APV->Gain = 1;
880  APV_Gain->Fill(APV->Index, APV->Gain);
881 
882  if (!FirstSetOfConstants)
883  APV->Gain *= APV->PreviousGain;
884  APV_CumulGain->Fill(APV->Index, APV->Gain);
885  }
886 
887  for (int j = 0; j < Charge_Vs_PathLength->GetXaxis()->GetNbins(); j++) {
888  Proj = Charge_Vs_PathLength->ProjectionY(" ", j, j, "e");
889  getPeakOfLandau(Proj, FitResults);
890  if (FitResults[0] == -0.5)
891  continue;
892  MPV_Vs_PathLength->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
893  MPV_Vs_PathLength->SetBinError(j, FitResults[1] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
894  FWHM_Vs_PathLength->SetBinContent(
895  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
896  FWHM_Vs_PathLength->SetBinError(
897  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
898  delete Proj;
899  }
900 
901  for (int j = 0; j < Charge_Vs_PathLength320->GetXaxis()->GetNbins(); j++) {
902  Proj = Charge_Vs_PathLength320->ProjectionY(" ", j, j, "e");
903  getPeakOfLandau(Proj, FitResults);
904  if (FitResults[0] == -0.5)
905  continue;
906  MPV_Vs_PathLength320->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
907  MPV_Vs_PathLength320->SetBinError(j, FitResults[1] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
908  FWHM_Vs_PathLength320->SetBinContent(
909  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
910  FWHM_Vs_PathLength320->SetBinError(
911  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
912  delete Proj;
913  }
914 
915  for (int j = 0; j < Charge_Vs_PathLength500->GetXaxis()->GetNbins(); j++) {
916  Proj = Charge_Vs_PathLength500->ProjectionY(" ", j, j, "e");
917  getPeakOfLandau(Proj, FitResults);
918  if (FitResults[0] == -0.5)
919  continue;
920  MPV_Vs_PathLength500->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
921  MPV_Vs_PathLength500->SetBinError(j, FitResults[1] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
922  FWHM_Vs_PathLength500->SetBinContent(
923  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
924  FWHM_Vs_PathLength500->SetBinError(
925  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
926  delete Proj;
927  }
928  /*
929  for(int j=0;j<Charge_Vs_PathLength_CS1->GetXaxis()->GetNbins();j++){
930  Proj = Charge_Vs_PathLength_CS1->ProjectionY(" ",j,j,"e");
931  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
932  MPV_Vs_PathLength_CS1->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
933  MPV_Vs_PathLength_CS1->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
934  FWHM_Vs_PathLength_CS1->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
935  FWHM_Vs_PathLength_CS1->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
936  delete Proj;
937  }
938 
939  for(int j=0;j<Charge_Vs_PathLength_CS2->GetXaxis()->GetNbins();j++){
940  Proj = Charge_Vs_PathLength_CS2->ProjectionY(" ",j,j,"e");
941  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
942  MPV_Vs_PathLength_CS2->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
943  MPV_Vs_PathLength_CS2->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
944  FWHM_Vs_PathLength_CS2->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
945  FWHM_Vs_PathLength_CS2->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
946  delete Proj;
947  }
948 
949  for(int j=0;j<Charge_Vs_PathLength_CS3->GetXaxis()->GetNbins();j++){
950  Proj = Charge_Vs_PathLength_CS3->ProjectionY(" ",j,j,"e");
951  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
952  MPV_Vs_PathLength_CS3->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
953  MPV_Vs_PathLength_CS3->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
954  FWHM_Vs_PathLength_CS3->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
955  FWHM_Vs_PathLength_CS3->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
956  delete Proj;
957  }
958 
959  for(int j=0;j<Charge_Vs_PathLength_CS4->GetXaxis()->GetNbins();j++){
960  Proj = Charge_Vs_PathLength_CS4->ProjectionY(" ",j,j,"e");
961  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
962  MPV_Vs_PathLength_CS4->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
963  MPV_Vs_PathLength_CS4->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
964  FWHM_Vs_PathLength_CS4->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
965  FWHM_Vs_PathLength_CS4->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
966  delete Proj;
967  }
968 
969  for(int j=0;j<Charge_Vs_PathLength_CS5->GetXaxis()->GetNbins();j++){
970  Proj = Charge_Vs_PathLength_CS5->ProjectionY(" ",j,j,"e");
971  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
972  MPV_Vs_PathLength_CS5->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
973  MPV_Vs_PathLength_CS5->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
974  FWHM_Vs_PathLength_CS5->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
975  FWHM_Vs_PathLength_CS5->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
976  delete Proj;
977  }
978 */
979 
980  for (int j = 0; j < Charge_Vs_PathTIB->GetXaxis()->GetNbins(); j++) {
981  Proj = Charge_Vs_PathTIB->ProjectionY(" ", j, j, "e");
982  getPeakOfLandau(Proj, FitResults);
983  if (FitResults[0] == -0.5)
984  continue;
985  MPV_Vs_PathTIB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
986  MPV_Vs_PathTIB->SetBinError(j, FitResults[1] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
987  delete Proj;
988  }
989 
990  for (int j = 0; j < Charge_Vs_PathTID->GetXaxis()->GetNbins(); j++) {
991  Proj = Charge_Vs_PathTID->ProjectionY(" ", j, j, "e");
992  getPeakOfLandau(Proj, FitResults);
993  if (FitResults[0] == -0.5)
994  continue;
995  MPV_Vs_PathTID->SetBinContent(j, FitResults[0] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
996  MPV_Vs_PathTID->SetBinError(j, FitResults[1] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
997  delete Proj;
998  }
999 
1000  for (int j = 0; j < Charge_Vs_PathTOB->GetXaxis()->GetNbins(); j++) {
1001  Proj = Charge_Vs_PathTOB->ProjectionY(" ", j, j, "e");
1002  getPeakOfLandau(Proj, FitResults);
1003  if (FitResults[0] == -0.5)
1004  continue;
1005  MPV_Vs_PathTOB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1006  MPV_Vs_PathTOB->SetBinError(j, FitResults[1] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1007  delete Proj;
1008  }
1009 
1010  for (int j = 0; j < Charge_Vs_PathTEC->GetXaxis()->GetNbins(); j++) {
1011  Proj = Charge_Vs_PathTEC->ProjectionY(" ", j, j, "e");
1012  getPeakOfLandau(Proj, FitResults);
1013  if (FitResults[0] == -0.5)
1014  continue;
1015  MPV_Vs_PathTEC->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1016  MPV_Vs_PathTEC->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1017  delete Proj;
1018  }
1019 
1020  for (int j = 0; j < Charge_Vs_PathTEC1->GetXaxis()->GetNbins(); j++) {
1021  Proj = Charge_Vs_PathTEC1->ProjectionY(" ", j, j, "e");
1022  getPeakOfLandau(Proj, FitResults);
1023  if (FitResults[0] == -0.5)
1024  continue;
1025  MPV_Vs_PathTEC1->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1026  MPV_Vs_PathTEC1->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1027  delete Proj;
1028  }
1029 
1030  for (int j = 0; j < Charge_Vs_PathTEC2->GetXaxis()->GetNbins(); j++) {
1031  Proj = Charge_Vs_PathTEC2->ProjectionY(" ", j, j, "e");
1032  getPeakOfLandau(Proj, FitResults);
1033  if (FitResults[0] == -0.5)
1034  continue;
1035  MPV_Vs_PathTEC2->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1036  MPV_Vs_PathTEC2->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1037  delete Proj;
1038  }
1039 
1040  for (int j = 1; j < Charge_Vs_TransversAngle->GetXaxis()->GetNbins(); j++) {
1041  Proj = Charge_Vs_TransversAngle->ProjectionY(" ", j, j, "e");
1042  getPeakOfLandau(Proj, FitResults);
1043  if (FitResults[0] == -0.5)
1044  continue;
1045  MPV_Vs_TransversAngle->SetBinContent(j, FitResults[0]);
1046  MPV_Vs_TransversAngle->SetBinError(j, FitResults[1]);
1047  delete Proj;
1048  }
1049 
1050  for (int j = 1; j < Charge_Vs_Alpha->GetXaxis()->GetNbins(); j++) {
1051  Proj = Charge_Vs_Alpha->ProjectionY(" ", j, j, "e");
1052  getPeakOfLandau(Proj, FitResults);
1053  if (FitResults[0] == -0.5)
1054  continue;
1055  MPV_Vs_Alpha->SetBinContent(j, FitResults[0]);
1056  MPV_Vs_Alpha->SetBinError(j, FitResults[1]);
1057  delete Proj;
1058  }
1059 
1060  for (int j = 1; j < Charge_Vs_Beta->GetXaxis()->GetNbins(); j++) {
1061  Proj = Charge_Vs_Beta->ProjectionY(" ", j, j, "e");
1062  getPeakOfLandau(Proj, FitResults);
1063  if (FitResults[0] == -0.5)
1064  continue;
1065  MPV_Vs_Beta->SetBinContent(j, FitResults[0]);
1066  MPV_Vs_Beta->SetBinError(j, FitResults[1]);
1067  delete Proj;
1068  }
1069 
1070  FILE* Gains = fopen(OutputGains.c_str(), "w");
1071  fprintf(Gains, "NEvents = %i\n", NEvent);
1072  fprintf(Gains, "Number of APVs = %lu\n", static_cast<unsigned long>(APVsColl.size()));
1073  fprintf(Gains, "GoodFits = %i BadFits = %i ratio = %f\n", GOOD, BAD, (100.0 * GOOD) / (GOOD + BAD));
1074  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1075  stAPVGain* APV = *it;
1076  fprintf(Gains,
1077  "%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n",
1078  APV->DetId,
1079  APV->APVId,
1080  APV->PreviousGain,
1081  APV->Gain);
1082  }
1083 
1084  std::vector<unsigned int> DetIdOfBuggedAPV;
1085  fprintf(Gains, "----------------------------------------------------------------------\n");
1086  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1087  stAPVGain* APV = *it;
1088  if (APV->FitMPV > 0 && APV->FitMPV < 200) {
1089  bool tmpBug = false;
1090  for (unsigned int b = 0; b < DetIdOfBuggedAPV.size() && !tmpBug; b++) {
1091  if (DetIdOfBuggedAPV[b] == APV->DetId)
1092  tmpBug = true;
1093  }
1094  if (!tmpBug) {
1095  fprintf(Gains, "%i,\n", APV->DetId);
1096  DetIdOfBuggedAPV.push_back(APV->DetId);
1097  }
1098  }
1099  }
1100 
1101  fclose(Gains);
1102 
1103  // delete [] FitResults;
1104  // delete Proj;
1105  }
1106 
1107  dqmStore_->cd();
1109 }
static constexpr auto TEC
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:13
unsigned int DetId
Definition: APVGainStruct.h:12
vector< string > VInputFiles
std::unordered_map< unsigned int, stAPVGain * > APVsColl
unsigned int Index
Definition: APVGainStruct.h:10
const std::complex< double > I
Definition: I.h:8
double f[11][100]
double const GOOD
Definition: Constants.h:13
static constexpr auto TOB
double const BAD
Definition: Constants.h:15
static constexpr auto TIB
double b
Definition: hdecay.h:120
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:824
static constexpr auto TID

◆ ComputeChargeOverPath()

double SiStripGainFromData::ComputeChargeOverPath ( const SiStripCluster Cluster,
TrajectoryStateOnSurface  trajState,
const edm::EventSetup iSetup,
const Track track,
double  trajChi2OverN 
)
private

Definition at line 1234 of file SiStripGainFromData.cc.

References a, AllowSaturation, simBeamSpotPI::alpha, SiStripCluster::amplitudes(), sistrip::APV, APV_Charge, APV_Momentum, APV_PathLength, APVsColl, HLT_2023v12_cff::beta, PixelTestBeamValidation_cfi::Charge, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, SiStripCluster::firstStrip(), TrajectoryStateOnSurface::globalMomentum(), HFirstStrip, IsFarFromBorder(), TrajectoryStateOnSurface::localDirection(), PV3DBase< T, PVType, FrameType >::mag(), MaxNrStrips, NHighStripInCluster, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, castor_dqm_sourceclient_file_cfg::path, funct::pow(), mathSSE::sqrt(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Validation, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by algoAnalyze().

1238  {
1239  LocalVector trackDirection = trajState.localDirection();
1240  double cosine = trackDirection.z() / trackDirection.mag();
1241  auto const& Ampls = Cluster->amplitudes();
1242  uint32_t DetId = 0; // is 0 since long time Cluster->geographicalId();
1243  int FirstStrip = Cluster->firstStrip();
1244  int APVId = FirstStrip / 128;
1245  stAPVGain* APV = APVsColl[(DetId << 3) | APVId];
1246  int Saturation = 0;
1247  bool Overlaping = false;
1248  int Charge = 0;
1249  unsigned int NHighStrip = 0;
1250 
1251  if (!IsFarFromBorder(trajState, DetId, iSetup))
1252  return -1;
1253 
1254  if (FirstStrip == 0)
1255  Overlaping = true;
1256  if (FirstStrip == 128)
1257  Overlaping = true;
1258  if (FirstStrip == 256)
1259  Overlaping = true;
1260  if (FirstStrip == 384)
1261  Overlaping = true;
1262  if (FirstStrip == 512)
1263  Overlaping = true;
1264  if (FirstStrip == 640)
1265  Overlaping = true;
1266 
1267  if (FirstStrip <= 127 && FirstStrip + Ampls.size() > 127)
1268  Overlaping = true;
1269  if (FirstStrip <= 255 && FirstStrip + Ampls.size() > 255)
1270  Overlaping = true;
1271  if (FirstStrip <= 383 && FirstStrip + Ampls.size() > 383)
1272  Overlaping = true;
1273  if (FirstStrip <= 511 && FirstStrip + Ampls.size() > 511)
1274  Overlaping = true;
1275  if (FirstStrip <= 639 && FirstStrip + Ampls.size() > 639)
1276  Overlaping = true;
1277 
1278  if (FirstStrip + Ampls.size() == 127)
1279  Overlaping = true;
1280  if (FirstStrip + Ampls.size() == 255)
1281  Overlaping = true;
1282  if (FirstStrip + Ampls.size() == 383)
1283  Overlaping = true;
1284  if (FirstStrip + Ampls.size() == 511)
1285  Overlaping = true;
1286  if (FirstStrip + Ampls.size() == 639)
1287  Overlaping = true;
1288  if (FirstStrip + Ampls.size() == 767)
1289  Overlaping = true;
1290  if (Overlaping)
1291  return -1;
1292 
1293  /*
1294  if(FirstStrip==0 )Overlaping=true;
1295  if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlaping=true;
1296  if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlaping=true;
1297  if(FirstStrip+Ampls.size()==511 )Overlaping=true;
1298  if(FirstStrip+Ampls.size()==767 )Overlaping=true;
1299  if(Overlaping)return -1;
1300 */
1301 
1302  for (unsigned int a = 0; a < Ampls.size(); a++) {
1303  Charge += Ampls[a];
1304  if (Ampls[a] >= 254)
1305  Saturation++;
1306  if (Ampls[a] >= 20)
1307  NHighStrip++;
1308  }
1309  double path = (10.0 * APV->Thickness) / fabs(cosine);
1310  double ClusterChargeOverPath = (double)Charge / path;
1311 
1312  NSatStripInCluster->Fill(Saturation);
1313 
1314  if (Ampls.size() > MaxNrStrips)
1315  return -1;
1316  if (Saturation > 0 && !AllowSaturation)
1317  return -1;
1319  if (APV->Thickness < 0.04)
1321  if (APV->Thickness > 0.04)
1323  if (APV->SubDet == StripSubdetector::TIB)
1324  Charge_Vs_PathTIB->Fill(path, Charge);
1325  if (APV->SubDet == StripSubdetector::TID)
1326  Charge_Vs_PathTID->Fill(path, Charge);
1327  if (APV->SubDet == StripSubdetector::TOB)
1328  Charge_Vs_PathTOB->Fill(path, Charge);
1329  if (APV->SubDet == StripSubdetector::TEC) {
1330  Charge_Vs_PathTEC->Fill(path, Charge);
1331  if (APV->Thickness < 0.04)
1332  Charge_Vs_PathTEC1->Fill(path, Charge);
1333  if (APV->Thickness > 0.04)
1334  Charge_Vs_PathTEC2->Fill(path, Charge);
1335  }
1336 
1337  double trans = atan2(trackDirection.y(), trackDirection.x()) * (180 / 3.14159265);
1338  double alpha =
1339  acos(trackDirection.x() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1340  double beta =
1341  acos(trackDirection.y() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1342 
1343  if (path > 0.4 && path < 0.45) {
1344  Charge_Vs_TransversAngle->Fill(trans, Charge / path);
1345  Charge_Vs_Alpha->Fill(alpha, Charge / path);
1346  Charge_Vs_Beta->Fill(beta, Charge / path);
1347  }
1348 
1349  NStrips_Vs_TransversAngle->Fill(trans, Ampls.size());
1350  NStrips_Vs_Alpha->Fill(alpha, Ampls.size());
1351  NStrips_Vs_Beta->Fill(beta, Ampls.size());
1352 
1353  NHighStripInCluster->Fill(NHighStrip);
1354  // if(NHighStrip==1) Charge_Vs_PathLength_CS1->Fill(path, Charge );
1355  // if(NHighStrip==2) Charge_Vs_PathLength_CS2->Fill(path, Charge );
1356  // if(NHighStrip==3) Charge_Vs_PathLength_CS3->Fill(path, Charge );
1357  // if(NHighStrip==4) Charge_Vs_PathLength_CS4->Fill(path, Charge );
1358  // if(NHighStrip==5) Charge_Vs_PathLength_CS5->Fill(path, Charge );
1359 
1360  HFirstStrip->Fill(FirstStrip);
1361 
1362  if (Validation) {
1363  ClusterChargeOverPath = ClusterChargeOverPath / APV->PreviousGain;
1364  }
1365 
1366  APV_Charge->Fill(APV->Index, ClusterChargeOverPath);
1367  APV_Momentum->Fill(APV->Index, trajState.globalMomentum().mag());
1368  APV_PathLength->Fill(APV->Index, path);
1369 
1370  return ClusterChargeOverPath;
1371 }
static constexpr auto TEC
uint16_t firstStrip() const
T z() const
Definition: PV3DBase.h:61
bool IsFarFromBorder(TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
std::unordered_map< unsigned int, stAPVGain * > APVsColl
SiStripCluster const & amplitudes() const
T sqrt(T t)
Definition: SSEVec.h:19
LocalVector localDirection() const
T mag() const
Definition: PV3DBase.h:64
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:121
static constexpr auto TID
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ getNewObject()

std::unique_ptr< SiStripApvGain > SiStripGainFromData::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1463 of file SiStripGainFromData.cc.

References a, AlgoMode, sistrip::APV, APVsCollOrdered, gather_cfg::cout, getGTfromDQMFile::obj, and FastTimerService_cff::range.

1463  {
1464  cout << "START getNewObject\n";
1465 
1466  // if( !(strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"SingleJob")==0) )return NULL;
1467  if (!(strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "SingleJob") == 0))
1468  return std::make_unique<SiStripApvGain>();
1469 
1470  auto obj = std::make_unique<SiStripApvGain>();
1471  std::vector<float>* theSiStripVector = nullptr;
1472  unsigned int PreviousDetId = -1;
1473  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1475  if (APV == nullptr) {
1476  printf("Bug\n");
1477  continue;
1478  }
1479  if (APV->DetId != PreviousDetId) {
1480  if (theSiStripVector != nullptr) {
1481  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1482  if (!obj->put(PreviousDetId, range))
1483  printf("Bug to put detId = %i\n", PreviousDetId);
1484  }
1485 
1486  theSiStripVector = new std::vector<float>;
1487  PreviousDetId = APV->DetId;
1488  }
1489  printf("%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId, APV->APVId, APV->PreviousGain, APV->Gain);
1490  if (theSiStripVector != nullptr) {
1491  theSiStripVector->push_back(APV->Gain);
1492  }
1493  // theSiStripVector->push_back(APV->Gain);
1494  }
1495 
1496  if (theSiStripVector != nullptr) {
1497  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1498  if (!obj->put(PreviousDetId, range))
1499  printf("Bug to put detId = %i\n", PreviousDetId);
1500  }
1501 
1502  cout << "END getNewObject\n";
1503  return obj;
1504 }
std::vector< stAPVGain * > APVsCollOrdered
std::pair< ContainerIterator, ContainerIterator > Range
double a
Definition: hdecay.h:121

◆ getPeakOfLandau()

void SiStripGainFromData::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 0,
double  HighRange = 5400 
)
private

Definition at line 1414 of file SiStripGainFromData.cc.

References MaxChi2OverNDF, MinNrEntries, and ApeEstimator_cff::width.

Referenced by algoEndJob().

1414  {
1415  double adcs = -0.5;
1416  double adcs_err = 0.;
1417  double width = -0.5;
1418  double width_err = 0;
1419  double chi2overndf = -0.5;
1420 
1421  double nr_of_entries = InputHisto->GetEntries();
1422 
1423  if ((unsigned int)nr_of_entries < MinNrEntries) {
1424  FitResults[0] = adcs;
1425  FitResults[1] = adcs_err;
1426  FitResults[2] = width;
1427  FitResults[3] = width_err;
1428  FitResults[4] = chi2overndf;
1429  return;
1430  }
1431 
1432  // perform fit with standard landau
1433  TF1* MyLandau = new TF1("MyLandau", "landau", LowRange, HighRange);
1434  MyLandau->SetParameter("MPV", 300);
1435 
1436  InputHisto->Fit(MyLandau, "QR WW");
1437 
1438  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1439  adcs = MyLandau->GetParameter("MPV");
1440  adcs_err = MyLandau->GetParError(1);
1441  width = MyLandau->GetParameter(2);
1442  width_err = MyLandau->GetParError(2);
1443  chi2overndf = MyLandau->GetChisquare() / MyLandau->GetNDF();
1444 
1445  // if still wrong, give up
1446  if (adcs < 2. || chi2overndf > MaxChi2OverNDF) {
1447  adcs = -0.5;
1448  adcs_err = 0.;
1449  width = -0.5;
1450  width_err = 0;
1451  chi2overndf = -0.5;
1452  }
1453 
1454  FitResults[0] = adcs;
1455  FitResults[1] = adcs_err;
1456  FitResults[2] = width;
1457  FitResults[3] = width_err;
1458  FitResults[4] = chi2overndf;
1459 
1460  delete MyLandau;
1461 }

◆ IsFarFromBorder()

bool SiStripGainFromData::IsFarFromBorder ( TrajectoryStateOnSurface  trajState,
const uint32_t  detid,
const edm::EventSetup iSetup 
)
private

Definition at line 1373 of file SiStripGainFromData.cc.

References gather_cfg::cout, edm::EventSetup::getData(), ProducerSetup_cfi::HalfLength, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LocalTrajectoryError::positionError(), tkGeomToken_, PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by ComputeChargeOverPath().

1375  {
1376  const auto& tkGeom = iSetup->getData(tkGeomToken_);
1377 
1378  LocalPoint HitLocalPos = trajState.localPosition();
1379  LocalError HitLocalError = trajState.localError().positionError();
1380 
1381  const GeomDetUnit* it = tkGeom.idToDetUnit(DetId(detid));
1382  if (dynamic_cast<const StripGeomDetUnit*>(it) == nullptr && dynamic_cast<const PixelGeomDetUnit*>(it) == nullptr) {
1383  std::cout << "this detID doesn't seem to belong to the Tracker" << std::endl;
1384  return false;
1385  }
1386 
1387  const BoundPlane plane = it->surface();
1388  const TrapezoidalPlaneBounds* trapezoidalBounds(dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
1389  const RectangularPlaneBounds* rectangularBounds(dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));
1390 
1391  double DistFromBorder = 1.0;
1392  //double HalfWidth = it->surface().bounds().width() /2.0;
1393  double HalfLength;
1394 
1395  if (trapezoidalBounds) {
1396  std::array<const float, 4> const& parameters = (*trapezoidalBounds).parameters();
1397  HalfLength = parameters[3];
1398  //double t = (HalfLength + HitLocalPos.y()) / (2*HalfLength) ;
1399  //HalfWidth = parameters[0] + (parameters[1]-parameters[0]) * t;
1400  } else if (rectangularBounds) {
1401  //HalfWidth = it->surface().bounds().width() /2.0;
1402  HalfLength = it->surface().bounds().length() / 2.0;
1403  } else {
1404  return false;
1405  }
1406 
1407  // if (fabs(HitLocalPos.x())+HitLocalError.xx() >= (HalfWidth - DistFromBorder) ) return false;//Don't think is really necessary
1408  if (fabs(HitLocalPos.y()) + HitLocalError.yy() >= (HalfLength - DistFromBorder))
1409  return false;
1410 
1411  return true;
1412 }
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
const LocalTrajectoryError & localError() const
LocalError positionError() const
float yy() const
Definition: LocalError.h:24
T y() const
Definition: PV3DBase.h:60
Definition: DetId.h:17

Member Data Documentation

◆ AlgoMode

std::string SiStripGainFromData::AlgoMode
private

◆ AllowSaturation

bool SiStripGainFromData::AllowSaturation
private

Definition at line 104 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

◆ APV_Charge

TH2F* SiStripGainFromData::APV_Charge
private

Definition at line 180 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ APV_CumulGain

TH1F* SiStripGainFromData::APV_CumulGain
private

Definition at line 185 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ APV_DetId

TH1F* SiStripGainFromData::APV_DetId
private

Definition at line 174 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APV_Eta

TH1F* SiStripGainFromData::APV_Eta
private

Definition at line 176 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APV_Gain

TH1F* SiStripGainFromData::APV_Gain
private

Definition at line 184 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ APV_Id

TH1F* SiStripGainFromData::APV_Id
private

Definition at line 175 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APV_Momentum

TH2F* SiStripGainFromData::APV_Momentum
private

Definition at line 179 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ APV_MPV

TH1F* SiStripGainFromData::APV_MPV
private

Definition at line 183 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ APV_PathLength

TH2F* SiStripGainFromData::APV_PathLength
private

Definition at line 181 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ APV_PathLengthM

TH1F* SiStripGainFromData::APV_PathLengthM
private

Definition at line 182 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ APV_PrevGain

TH1F* SiStripGainFromData::APV_PrevGain
private

Definition at line 186 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoBeginRun().

◆ APV_R

TH1F* SiStripGainFromData::APV_R
private

Definition at line 177 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APV_SubDet

TH1F* SiStripGainFromData::APV_SubDet
private

Definition at line 178 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APV_Thickness

TH1F* SiStripGainFromData::APV_Thickness
private

Definition at line 187 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ APVsColl

std::unordered_map<unsigned int, stAPVGain*> SiStripGainFromData::APVsColl
private

Definition at line 271 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ APVsCollOrdered

std::vector<stAPVGain*> SiStripGainFromData::APVsCollOrdered
private

Definition at line 270 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), algoEndJob(), and getNewObject().

◆ CalibrationLevel

int SiStripGainFromData::CalibrationLevel
private

Definition at line 107 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

◆ Charge_TEC

TH1F* SiStripGainFromData::Charge_TEC
private

Definition at line 161 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TEC1

TH1F* SiStripGainFromData::Charge_TEC1
private

Definition at line 162 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TEC2

TH1F* SiStripGainFromData::Charge_TEC2
private

Definition at line 163 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TECM

TH1F* SiStripGainFromData::Charge_TECM
private

Definition at line 165 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TECP

TH1F* SiStripGainFromData::Charge_TECP
private

Definition at line 164 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TIB

TH1F* SiStripGainFromData::Charge_TIB
private

Definition at line 156 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TID

TH1F* SiStripGainFromData::Charge_TID
private

Definition at line 157 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TIDM

TH1F* SiStripGainFromData::Charge_TIDM
private

Definition at line 159 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TIDP

TH1F* SiStripGainFromData::Charge_TIDP
private

Definition at line 158 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_TOB

TH1F* SiStripGainFromData::Charge_TOB
private

Definition at line 160 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Charge_Vs_Alpha

TH2F* SiStripGainFromData::Charge_Vs_Alpha
private

Definition at line 231 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_Beta

TH2F* SiStripGainFromData::Charge_Vs_Beta
private

Definition at line 235 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathLength

TH2F* SiStripGainFromData::Charge_Vs_PathLength
private

Definition at line 215 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathLength320

TH2F* SiStripGainFromData::Charge_Vs_PathLength320
private

Definition at line 216 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathLength500

TH2F* SiStripGainFromData::Charge_Vs_PathLength500
private

Definition at line 217 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTEC

TH2F* SiStripGainFromData::Charge_Vs_PathTEC
private

Definition at line 145 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTEC1

TH2F* SiStripGainFromData::Charge_Vs_PathTEC1
private

Definition at line 146 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTEC2

TH2F* SiStripGainFromData::Charge_Vs_PathTEC2
private

Definition at line 147 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTIB

TH2F* SiStripGainFromData::Charge_Vs_PathTIB
private

Definition at line 142 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTID

TH2F* SiStripGainFromData::Charge_Vs_PathTID
private

Definition at line 143 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_PathTOB

TH2F* SiStripGainFromData::Charge_Vs_PathTOB
private

Definition at line 144 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ Charge_Vs_TransversAngle

TH2F* SiStripGainFromData::Charge_Vs_TransversAngle
private

Definition at line 227 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ CheckIfFileExist

bool SiStripGainFromData::CheckIfFileExist
private

Definition at line 108 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

◆ CheckLocalAngle

bool SiStripGainFromData::CheckLocalAngle
private

Definition at line 93 of file SiStripGainFromData.cc.

Referenced by SiStripGainFromData().

◆ dqmStore_

DQMStore* SiStripGainFromData::dqmStore_
private

Definition at line 79 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and SiStripGainFromData().

◆ EEvent

unsigned int SiStripGainFromData::EEvent
private

Definition at line 258 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ Error_Vs_Entries

TH2F* SiStripGainFromData::Error_Vs_Entries
private

Definition at line 240 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Error_Vs_Eta

TH2F* SiStripGainFromData::Error_Vs_Eta
private

Definition at line 241 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Error_Vs_MPV

TH2F* SiStripGainFromData::Error_Vs_MPV
private

Definition at line 239 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ Error_Vs_Phi

TH2F* SiStripGainFromData::Error_Vs_Phi
private

Definition at line 242 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ ERun

unsigned int SiStripGainFromData::ERun
private

Definition at line 257 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ ETimestamp

TimeValue_t SiStripGainFromData::ETimestamp
private

Definition at line 259 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

◆ FirstSetOfConstants

bool SiStripGainFromData::FirstSetOfConstants
private

Definition at line 105 of file SiStripGainFromData.cc.

Referenced by algoBeginRun(), algoEndJob(), and SiStripGainFromData().

◆ FWHM_Vs_PathLength

TH1F* SiStripGainFromData::FWHM_Vs_PathLength
private

Definition at line 223 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ FWHM_Vs_PathLength320

TH1F* SiStripGainFromData::FWHM_Vs_PathLength320
private

Definition at line 224 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ FWHM_Vs_PathLength500

TH1F* SiStripGainFromData::FWHM_Vs_PathLength500
private

Definition at line 225 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ gainToken_

edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripGainFromData::gainToken_
private

Definition at line 275 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), and SiStripGainFromData().

◆ HChi2OverNDF

TH1F* SiStripGainFromData::HChi2OverNDF
private

Definition at line 124 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ HFirstStrip

TH1F* SiStripGainFromData::HFirstStrip
private

Definition at line 251 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ HitLocalPosition

TH2F* SiStripGainFromData::HitLocalPosition
private

Definition at line 246 of file SiStripGainFromData.cc.

◆ HitLocalPositionBefCut

TH2F* SiStripGainFromData::HitLocalPositionBefCut
private

Definition at line 247 of file SiStripGainFromData.cc.

◆ HTrackChi2OverNDF

TH1F* SiStripGainFromData::HTrackChi2OverNDF
private

Definition at line 125 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ HTrackHits

TH1F* SiStripGainFromData::HTrackHits
private

Definition at line 126 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ iEvent_

const edm::Event* SiStripGainFromData::iEvent_
private

Definition at line 91 of file SiStripGainFromData.cc.

Referenced by algoAnalyze().

◆ iSetup_

const edm::EventSetup* SiStripGainFromData::iSetup_
private

Definition at line 90 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ JobInfo

TH1F* SiStripGainFromData::JobInfo
private

Definition at line 249 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MaxChi2OverNDF

double SiStripGainFromData::MaxChi2OverNDF
private

Definition at line 96 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

◆ MaxMPVError

double SiStripGainFromData::MaxMPVError
private

Definition at line 95 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

◆ MaxNrStrips

unsigned int SiStripGainFromData::MaxNrStrips
private

Definition at line 101 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

◆ MaxTrackChiOverNdf

double SiStripGainFromData::MaxTrackChiOverNdf
private

Definition at line 103 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MaxTrackEta

double SiStripGainFromData::MaxTrackEta
private

Definition at line 100 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MaxTrackMomentum

double SiStripGainFromData::MaxTrackMomentum
private

Definition at line 98 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MinNrEntries

unsigned int SiStripGainFromData::MinNrEntries
private

Definition at line 94 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

◆ MinTrackEta

double SiStripGainFromData::MinTrackEta
private

Definition at line 99 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MinTrackHits

unsigned int SiStripGainFromData::MinTrackHits
private

Definition at line 102 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MinTrackMomentum

double SiStripGainFromData::MinTrackMomentum
private

Definition at line 97 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ MPV_Vs_Alpha

TH1F* SiStripGainFromData::MPV_Vs_Alpha
private

Definition at line 232 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_Beta

TH1F* SiStripGainFromData::MPV_Vs_Beta
private

Definition at line 236 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_Eta

TH2F* SiStripGainFromData::MPV_Vs_Eta
private

Definition at line 168 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTEC

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC
private

Definition at line 131 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTEC1

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC1
private

Definition at line 132 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTEC2

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC2
private

Definition at line 133 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTIB

TH2F* SiStripGainFromData::MPV_Vs_EtaTIB
private

Definition at line 128 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTID

TH2F* SiStripGainFromData::MPV_Vs_EtaTID
private

Definition at line 129 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_EtaTOB

TH2F* SiStripGainFromData::MPV_Vs_EtaTOB
private

Definition at line 130 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathLength

TH1F* SiStripGainFromData::MPV_Vs_PathLength
private

Definition at line 219 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathLength320

TH1F* SiStripGainFromData::MPV_Vs_PathLength320
private

Definition at line 220 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathLength500

TH1F* SiStripGainFromData::MPV_Vs_PathLength500
private

Definition at line 221 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTEC

TH1F* SiStripGainFromData::MPV_Vs_PathTEC
private

Definition at line 152 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTEC1

TH1F* SiStripGainFromData::MPV_Vs_PathTEC1
private

Definition at line 153 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTEC2

TH1F* SiStripGainFromData::MPV_Vs_PathTEC2
private

Definition at line 154 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTIB

TH1F* SiStripGainFromData::MPV_Vs_PathTIB
private

Definition at line 149 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTID

TH1F* SiStripGainFromData::MPV_Vs_PathTID
private

Definition at line 150 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PathTOB

TH1F* SiStripGainFromData::MPV_Vs_PathTOB
private

Definition at line 151 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_Phi

TH2F* SiStripGainFromData::MPV_Vs_Phi
private

Definition at line 167 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTEC

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC
private

Definition at line 138 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTEC1

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC1
private

Definition at line 139 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTEC2

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC2
private

Definition at line 140 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTIB

TH2F* SiStripGainFromData::MPV_Vs_PhiTIB
private

Definition at line 135 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTID

TH2F* SiStripGainFromData::MPV_Vs_PhiTID
private

Definition at line 136 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_PhiTOB

TH2F* SiStripGainFromData::MPV_Vs_PhiTOB
private

Definition at line 137 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_R

TH2F* SiStripGainFromData::MPV_Vs_R
private

Definition at line 169 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPV_Vs_TransversAngle

TH1F* SiStripGainFromData::MPV_Vs_TransversAngle
private

Definition at line 228 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPVs

TH1F* SiStripGainFromData::MPVs
private

Definition at line 189 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPVs320

TH1F* SiStripGainFromData::MPVs320
private

Definition at line 190 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ MPVs500

TH1F* SiStripGainFromData::MPVs500
private

Definition at line 191 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ NEvent

unsigned int SiStripGainFromData::NEvent
private

Definition at line 253 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ NHighStripInCluster

TH1F* SiStripGainFromData::NHighStripInCluster
private

Definition at line 196 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ NoMPV_Vs_EtaPhi

TH2F* SiStripGainFromData::NoMPV_Vs_EtaPhi
private

Definition at line 244 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ NSatStripInCluster

TH1F* SiStripGainFromData::NSatStripInCluster
private

Definition at line 195 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ NStrips_Vs_Alpha

TH2F* SiStripGainFromData::NStrips_Vs_Alpha
private

Definition at line 233 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ NStrips_Vs_Beta

TH2F* SiStripGainFromData::NStrips_Vs_Beta
private

Definition at line 237 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and ComputeChargeOverPath().

◆ NStrips_Vs_TransversAngle

TH2F* SiStripGainFromData::NStrips_Vs_TransversAngle
private

Definition at line 229 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

◆ NumberOfEntriesByAPV

TH1F* SiStripGainFromData::NumberOfEntriesByAPV
private

Definition at line 123 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

◆ OutputGains

std::string SiStripGainFromData::OutputGains
private

Definition at line 111 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

◆ OutputHistos

std::string SiStripGainFromData::OutputHistos
private

Definition at line 112 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

◆ SEvent

unsigned int SiStripGainFromData::SEvent
private

Definition at line 255 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ SRun

unsigned int SiStripGainFromData::SRun
private

Definition at line 254 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ STimestamp

TimeValue_t SiStripGainFromData::STimestamp
private

Definition at line 256 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

◆ tkGeomToken_

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripGainFromData::tkGeomToken_
private

Definition at line 274 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), IsFarFromBorder(), and SiStripGainFromData().

◆ tmp

MonitorElement* SiStripGainFromData::tmp
private

Definition at line 118 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

◆ Tracks_P_Vs_Eta

TH2F* SiStripGainFromData::Tracks_P_Vs_Eta
private

Definition at line 120 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ Tracks_Pt_Vs_Eta

TH2F* SiStripGainFromData::Tracks_Pt_Vs_Eta
private

Definition at line 121 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

◆ TrajToTrackLabel

std::string SiStripGainFromData::TrajToTrackLabel
private

Definition at line 114 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ TrajToTrackProducer

std::string SiStripGainFromData::TrajToTrackProducer
private

Definition at line 113 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

◆ tTopoToken_

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainFromData::tTopoToken_
private

Definition at line 273 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and SiStripGainFromData().

◆ Validation

bool SiStripGainFromData::Validation
private

◆ VInputFiles

vector<string> SiStripGainFromData::VInputFiles
private

Definition at line 116 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().