CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromData Class Reference
Inheritance diagram for SiStripGainFromData:
ConditionDBWriter< SiStripApvGain > edm::EDAnalyzer edm::EDConsumerBase

Classes

class  isEqual
 

Public Member Functions

 SiStripGainFromData (const edm::ParameterSet &)
 
 ~SiStripGainFromData () override
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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
 
ESProxyIndex const * esGetTokenIndices (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::vector< ModuleDescription const * > &modules, 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
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices 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
 
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
 
MonitorElementtmp
 
TH2F * Tracks_P_Vs_Eta
 
TH2F * Tracks_Pt_Vs_Eta
 
std::string TrajToTrackLabel
 
std::string TrajToTrackProducer
 
bool Validation
 
vector< string > VInputFiles
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 80 of file SiStripGainFromData.cc.

Constructor & Destructor Documentation

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

Definition at line 286 of file SiStripGainFromData.cc.

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

287 {
288  AlgoMode = iConfig.getParameter<std::string>("AlgoMode");
289 
290  OutputGains = iConfig.getParameter<std::string>("OutputGains");
291  OutputHistos = iConfig.getParameter<std::string>("OutputHistos");
292 
293  TrajToTrackProducer = iConfig.getParameter<std::string>("TrajToTrackProducer");
294  TrajToTrackLabel = iConfig.getParameter<std::string>("TrajToTrackLabel");
295 
296  CheckLocalAngle = iConfig.getUntrackedParameter<bool> ("checkLocalAngle" , false);
297  MinNrEntries = iConfig.getUntrackedParameter<unsigned>("minNrEntries" , 20);
298  MaxMPVError = iConfig.getUntrackedParameter<double> ("maxMPVError" , 500.0);
299  MaxChi2OverNDF = iConfig.getUntrackedParameter<double> ("maxChi2OverNDF" , 5.0);
300  MinTrackMomentum = iConfig.getUntrackedParameter<double> ("minTrackMomentum" , 3.0);
301  MaxTrackMomentum = iConfig.getUntrackedParameter<double> ("maxTrackMomentum" , 99999.0);
302  MinTrackEta = iConfig.getUntrackedParameter<double> ("minTrackEta" , -5.0);
303  MaxTrackEta = iConfig.getUntrackedParameter<double> ("maxTrackEta" , 5.0);
304  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips" , 2);
305  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits" , 8);
306  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double> ("MaxTrackChiOverNdf" , 3);
307  AllowSaturation = iConfig.getUntrackedParameter<bool> ("AllowSaturation" , false);
308  FirstSetOfConstants = iConfig.getUntrackedParameter<bool> ("FirstSetOfConstants", true);
309  Validation = iConfig.getUntrackedParameter<bool> ("Validation" , false);
310  CheckIfFileExist = iConfig.getUntrackedParameter<bool> ("CheckIfFileExist" , false);
311 
312  CalibrationLevel = iConfig.getUntrackedParameter<int> ("CalibrationLevel" , 0);
313 
314 
315  if( strcmp(AlgoMode.c_str(),"WriteOnDB")==0 )
316  VInputFiles = iConfig.getParameter<vector<string> >("VInputFiles");
317 
319 
320  //if( OutputHistos!="" )
321  // dqmStore_->open(OutputHistos.c_str(), true);
322 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
vector< string > VInputFiles
SiStripGainFromData::~SiStripGainFromData ( )
override

Definition at line 325 of file SiStripGainFromData.cc.

326 {
327 }

Member Function Documentation

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

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 999 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, reco::TrackBase::eta(), ETimestamp, edm::EventID::event(), Trajectory::foundHits(), edm::Event::getByLabel(), HTrackChi2OverNDF, HTrackHits, edm::EventBase::id(), iEvent, iEvent_, createfilelist::int, TrajectoryStateOnSurface::isValid(), MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, Trajectory::measurements(), MinTrackEta, MinTrackHits, MinTrackMomentum, SiStripMatchedRecHit2D::monoCluster(), ndof, NEvent, reco::TrackBase::p(), edm::Handle< T >::product(), reco::TrackBase::pt(), Trajectory::recHits(), edm::EventID::run(), SEvent, SRun, SiStripMatchedRecHit2D::stereoCluster(), STimestamp, edm::EventBase::time(), HiIsolationCommonParameters_cff::track, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, TrajToTrackLabel, TrajToTrackProducer, and edm::Timestamp::value().

1000 {
1001 
1002  if( strcmp(AlgoMode.c_str(),"WriteOnDB")==0 ) return;
1003 
1004  if(NEvent==0){
1005  SRun = iEvent.id().run();
1006  SEvent = iEvent.id().event();
1007  STimestamp = iEvent.time().value();
1008  }
1009  ERun = iEvent.id().run();
1010  EEvent = iEvent.id().event();
1011  ETimestamp = iEvent.time().value();
1012  NEvent++;
1013 
1014  iEvent_ = &iEvent;
1015 
1016  Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
1017  iEvent.getByLabel(TrajToTrackProducer, TrajToTrackLabel, trajTrackAssociationHandle);
1018  const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product();
1019 
1020 
1021  for(TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it!=TrajToTrackMap.end(); ++it) {
1022  const Track track = *it->val;
1023  const Trajectory traj = *it->key;
1024 
1025 
1026  if(track.p()<MinTrackMomentum || track.p()>MaxTrackMomentum || track.eta()<MinTrackEta || track.eta()>MaxTrackEta) continue;
1027 
1028  Tracks_Pt_Vs_Eta->Fill(fabs(track.eta()),track.pt());
1029  Tracks_P_Vs_Eta ->Fill(fabs(track.eta()),track.p());
1030 
1031  //BEGIN TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1032  int ndof =0;
1033  const Trajectory::RecHitContainer transRecHits = traj.recHits();
1034 
1035  for(Trajectory::RecHitContainer::const_iterator rechit = transRecHits.begin(); rechit != transRecHits.end(); ++rechit)
1036  if ((*rechit)->isValid()) ndof += (*rechit)->dimension();
1037  ndof -= 5;
1038  //END TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1039 
1040  HTrackChi2OverNDF->Fill(traj.chiSquared()/ndof);
1041  if(traj.chiSquared()/ndof>MaxTrackChiOverNdf)continue;
1042 
1043  vector<TrajectoryMeasurement> measurements = traj.measurements();
1044  HTrackHits->Fill(traj.foundHits());
1045  if(traj.foundHits()<(int)MinTrackHits)continue;
1046 /*
1047  //BEGIN TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1048  int NMatchedHit = 0;
1049  for(vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){
1050  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1051  if( !trajState.isValid() ) continue;
1052  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1053  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1054  if(sistripmatchedhit)NMatchedHit++;
1055 // NMatchedHit++;
1056 
1057  }
1058  //END TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1059 
1060  if(NMatchedHit<2){
1061  printf("NOT ENOUGH MATCHED RECHITS : %i\n",NMatchedHit);
1062  continue;
1063  }
1064 */
1065 
1066  for(vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){
1067 
1068  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1069  if( !trajState.isValid() ) continue;
1070 
1071  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1072  const SiStripRecHit1D* sistripsimple1dhit = dynamic_cast<const SiStripRecHit1D*>(hit);
1073  const SiStripRecHit2D* sistripsimplehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1074  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1075 
1076  if(sistripsimplehit){
1077  ComputeChargeOverPath((sistripsimplehit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared()/ndof);
1078  }else if(sistripmatchedhit){
1079  ComputeChargeOverPath(&sistripmatchedhit->monoCluster(),trajState, &iSetup, &track, traj.chiSquared()/ndof);
1080  ComputeChargeOverPath(&sistripmatchedhit->stereoCluster(),trajState, &iSetup, &track, traj.chiSquared()/ndof);
1081  }else if(sistripsimple1dhit){
1082  ComputeChargeOverPath((sistripsimple1dhit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared()/ndof);
1083  }else{
1084  }
1085 
1086  }
1087 
1088  }
1089 }
RunNumber_t run() const
Definition: EventID.h:39
ClusterRef cluster() const
double p() const
momentum vector magnitude
Definition: TrackBase.h:654
EventNumber_t event() const
Definition: EventID.h:41
int foundHits() const
Definition: Trajectory.h:225
const_iterator end() const
last iterator over the map (read only)
SiStripCluster const & monoCluster() const
ConstRecHitContainer recHits() const
Definition: Trajectory.h:204
DataContainer const & measurements() const
Definition: Trajectory.h:196
int iEvent
Definition: GenABIO.cc:224
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:690
double pt() const
track transverse momentum
Definition: TrackBase.h:660
ClusterRef cluster() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:46
T const * product() const
Definition: Handle.h:74
double ComputeChargeOverPath(const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
float chiSquared() const
Definition: Trajectory.h:262
SiStripCluster const & stereoCluster() const
edm::EventID id() const
Definition: EventBase.h:59
const_iterator begin() const
first iterator over the map (read only)
TimeValue_t value() const
Definition: Timestamp.h:56
edm::Timestamp time() const
Definition: EventBase.h:60
const edm::Event * iEvent_
void SiStripGainFromData::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 331 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, stAPVGain::APVId, APVsColl, APVsCollOrdered, 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, stAPVGain::DetId, TrackerGeometry::dets(), dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, stAPVGain::Eta, reco::tau::disc::Eta(), ETimestamp, cmsRelvalreport::exit, FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, edm::EventSetup::get(), MonitorElement::getTH1F(), MonitorElement::getTH2F(), HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, mps_fire::i, stAPVGain::Index, iSetup_, edm::ESHandleBase::isValid(), JobInfo, stAPVGain::MPV, 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, stAPVGain::Phi, colinearityKinematic::Phi, stAPVGain::PreviousGain, edm::ESHandle< T >::product(), stAPVGain::R, dttmaxenums::R, DetId::rawId(), SEvent, stAPVGain::Side, SRun, STimestamp, stAPVGain::SubDet, ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecSide(), stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, tmp, StripSubdetector::TOB, Tracks_P_Vs_Eta, and Tracks_Pt_Vs_Eta.

332 {
333  //Retrieve tracker topology from geometry
334  edm::ESHandle<TrackerTopology> tTopoHandle;
335  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
336  const TrackerTopology* const tTopo = tTopoHandle.product();
337 
338  iSetup_ = &iSetup;
339 
340 // TH1::AddDirectory(kTRUE);
341 
342  tmp = dqmStore_->book1D ("JobInfo" , "JobInfo", 20,0,20); JobInfo = tmp->getTH1F();
343 
344  tmp = dqmStore_->book1D ("APV_DetId" , "APV_DetId" , 72785,0,72784); APV_DetId = tmp->getTH1F();
345  tmp = dqmStore_->book1D ("APV_Id" , "APV_Id" , 72785,0,72784); APV_Id = tmp->getTH1F();
346  tmp = dqmStore_->book1D ("APV_Eta" , "APV_Eta" , 72785,0,72784); APV_Eta = tmp->getTH1F();
347  tmp = dqmStore_->book1D ("APV_R" , "APV_R" , 72785,0,72784); APV_R = tmp->getTH1F();
348  tmp = dqmStore_->book1D ("APV_SubDet" , "APV_SubDet" , 72785,0,72784); APV_SubDet = tmp->getTH1F();
349  tmp = dqmStore_->book2D ("APV_Momentum" , "APV_Momentum" , 72785,0,72784, 50,0,200); APV_Momentum = tmp->getTH2F();
350  tmp = dqmStore_->book2D ("APV_Charge" , "APV_Charge" , 72785,0,72784, 1000,0,2000); APV_Charge = tmp->getTH2F();
351  tmp = dqmStore_->book2D ("APV_PathLength" , "APV_PathLength" , 72785,0,72784, 100,0.2,1.4); APV_PathLength = tmp->getTH2F();
352  tmp = dqmStore_->book1D ("APV_PathLengthM", "APV_PathLengthM", 72785,0,72784); APV_PathLengthM = tmp->getTH1F();
353  tmp = dqmStore_->book1D ("APV_MPV" , "APV_MPV" , 72785,0,72784); APV_MPV = tmp->getTH1F();
354  tmp = dqmStore_->book1D ("APV_Gain" , "APV_Gain" , 72785,0,72784); APV_Gain = tmp->getTH1F();
355  tmp = dqmStore_->book1D ("APV_PrevGain" , "APV_PrevGain" , 72785,0,72784); APV_PrevGain = tmp->getTH1F();
356  tmp = dqmStore_->book1D ("APV_CumulGain" , "APV_CumulGain" , 72785,0,72784); APV_CumulGain = tmp->getTH1F();
357  tmp = dqmStore_->book1D ("APV_Thickness" , "APV_Thicknes" , 72785,0,72784); APV_Thickness = tmp->getTH1F();
358 
359 
360  tmp = dqmStore_->book2D ("Tracks_P_Vs_Eta" , "Tracks_P_Vs_Eta" , 30, 0,3,50,0,200); Tracks_P_Vs_Eta = tmp->getTH2F();
361  tmp = dqmStore_->book2D ("Tracks_Pt_Vs_Eta" , "Tracks_Pt_Vs_Eta", 30, 0,3,50,0,200); Tracks_Pt_Vs_Eta = tmp->getTH2F();
362 
363  tmp = dqmStore_->book2D ("Charge_Vs_PathTIB" , "Charge_Vs_PathTIB" ,100,0.2,1.4, 500,0,2000); Charge_Vs_PathTIB = tmp->getTH2F();
364  tmp = dqmStore_->book2D ("Charge_Vs_PathTID" , "Charge_Vs_PathTID" ,100,0.2,1.4, 500,0,2000); Charge_Vs_PathTID = tmp->getTH2F();
365  tmp = dqmStore_->book2D ("Charge_Vs_PathTOB" , "Charge_Vs_PathTOB" ,100,0.2,1.4, 500,0,2000); Charge_Vs_PathTOB = tmp->getTH2F();
366  tmp = dqmStore_->book2D ("Charge_Vs_PathTEC" , "Charge_Vs_PathTEC" ,100,0.2,1.4, 500,0,2000); Charge_Vs_PathTEC = tmp->getTH2F();
367  tmp = dqmStore_->book2D ("Charge_Vs_PathTEC1", "Charge_Vs_PathTEC1",100,0.2,1.4, 500,0,2000); Charge_Vs_PathTEC1 = tmp->getTH2F();
368  tmp = dqmStore_->book2D ("Charge_Vs_PathTEC2", "Charge_Vs_PathTEC2",100,0.2,1.4, 500,0,2000); Charge_Vs_PathTEC2 = tmp->getTH2F();
369 
370 
371  tmp = dqmStore_->book1D ("Charge_TIB" , "Charge_TIB" ,1000,0,2000); Charge_TIB = tmp->getTH1F();
372  tmp = dqmStore_->book1D ("Charge_TID" , "Charge_TID" ,1000,0,2000); Charge_TID = tmp->getTH1F();
373  tmp = dqmStore_->book1D ("Charge_TID+", "Charge_TID+",1000,0,2000); Charge_TIDP = tmp->getTH1F();
374  tmp = dqmStore_->book1D ("Charge_TID-", "Charge_TID-",1000,0,2000); Charge_TIDM = tmp->getTH1F();
375  tmp = dqmStore_->book1D ("Charge_TOB" , "Charge_TOB" ,1000,0,2000); Charge_TOB = tmp->getTH1F();
376  tmp = dqmStore_->book1D ("Charge_TEC" , "Charge_TEC" ,1000,0,2000); Charge_TEC = tmp->getTH1F();
377  tmp = dqmStore_->book1D ("Charge_TEC1", "Charge_TEC1",1000,0,2000); Charge_TEC1 = tmp->getTH1F();
378  tmp = dqmStore_->book1D ("Charge_TEC2", "Charge_TEC2",1000,0,2000); Charge_TEC2 = tmp->getTH1F();
379  tmp = dqmStore_->book1D ("Charge_TEC+", "Charge_TEC+",1000,0,2000); Charge_TECP = tmp->getTH1F();
380  tmp = dqmStore_->book1D ("Charge_TEC-", "Charge_TEC-",1000,0,2000); Charge_TECM = tmp->getTH1F();
381 
382 
383 /*
384  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();
385  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();
386  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();
387  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();
388  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();
389 */
390  tmp = dqmStore_->book2D ("Charge_Vs_PathLength" , "Charge_Vs_PathLength" , 100,0.2,1.4, 500,0,2000); Charge_Vs_PathLength = tmp->getTH2F();
391  tmp = dqmStore_->book2D ("Charge_Vs_PathLength320" , "Charge_Vs_PathLength" , 100,0.2,1.4, 500,0,2000); Charge_Vs_PathLength320 = tmp->getTH2F();
392  tmp = dqmStore_->book2D ("Charge_Vs_PathLength500" , "Charge_Vs_PathLength" , 100,0.2,1.4, 500,0,2000); Charge_Vs_PathLength500 = tmp->getTH2F();
393 
394  tmp = dqmStore_->book2D ("Charge_Vs_TransversAngle" , "Charge_Vs_TransversAngle" , 220,-20,200, 500,0,2000); Charge_Vs_TransversAngle = tmp->getTH2F();
395  tmp = dqmStore_->book2D ("Charge_Vs_Alpha" , "Charge_Vs_Alpha" , 220,-20,200, 500,0,2000); Charge_Vs_Alpha = tmp->getTH2F();
396  tmp = dqmStore_->book2D ("Charge_Vs_Beta" , "Charge_Vs_Beta" , 220,-20,200, 500,0,2000); Charge_Vs_Beta = tmp->getTH2F();
397 
398  tmp = dqmStore_->book2D ("NStrips_Vs_TransversAngle", "NStrips_Vs_TransversAngle", 220,-20,200, 10,0,10); NStrips_Vs_TransversAngle = tmp->getTH2F();
399  tmp = dqmStore_->book2D ("NStrips_Vs_Alpha" , "NStrips_Vs_Alpha" , 220,-20,200, 10,0,10); NStrips_Vs_Alpha = tmp->getTH2F();
400  tmp = dqmStore_->book2D ("NStrips_Vs_Beta" , "NStrips_Vs_Beta" , 220,-20,200, 10,0,10); NStrips_Vs_Beta = tmp->getTH2F();
401  tmp = dqmStore_->book1D ("NHighStripInCluster" , "NHighStripInCluster" , 15,0,14); NHighStripInCluster = tmp->getTH1F();
402  tmp = dqmStore_->book1D ("NSatStripInCluster" , "NSatStripInCluster" , 50,0,50); NSatStripInCluster = tmp->getTH1F();
403 
404  tmp = dqmStore_->book1D ("TrackChi2OverNDF","TrackChi2OverNDF", 500, 0,10); HTrackChi2OverNDF = tmp->getTH1F();
405  tmp = dqmStore_->book1D ("TrackHits","TrackHits", 40, 0,40); HTrackHits = tmp->getTH1F();
406 
407  tmp = dqmStore_->book1D ("FirstStrip","FirstStrip", 800, 0,800); HFirstStrip = tmp->getTH1F();
408 
409  if( strcmp(AlgoMode.c_str(),"MultiJob")!=0 ){
410 
411  tmp = dqmStore_->book2D ("MPV_Vs_EtaTIB" , "MPV_Vs_EtaTIB" , 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTIB = tmp->getTH2F();
412  tmp = dqmStore_->book2D ("MPV_Vs_EtaTID" , "MPV_Vs_EtaTID" , 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTID = tmp->getTH2F();
413  tmp = dqmStore_->book2D ("MPV_Vs_EtaTOB" , "MPV_Vs_EtaTOB" , 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTOB = tmp->getTH2F();
414  tmp = dqmStore_->book2D ("MPV_Vs_EtaTEC" , "MPV_Vs_EtaTEC" , 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTEC = tmp->getTH2F();
415  tmp = dqmStore_->book2D ("MPV_Vs_EtaTEC1" , "MPV_Vs_EtaTEC1", 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTEC1 = tmp->getTH2F();
416  tmp = dqmStore_->book2D ("MPV_Vs_EtaTEC2" , "MPV_Vs_EtaTEC2", 50, -3.0, 3.0, 300, 0, 600); MPV_Vs_EtaTEC2 = tmp->getTH2F();
417 
418  tmp = dqmStore_->book2D ("MPV_Vs_PhiTIB" , "MPV_Vs_PhiTIB" , 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTIB = tmp->getTH2F();
419  tmp = dqmStore_->book2D ("MPV_Vs_PhiTID" , "MPV_Vs_PhiTID" , 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTID = tmp->getTH2F();
420  tmp = dqmStore_->book2D ("MPV_Vs_PhiTOB" , "MPV_Vs_PhiTOB" , 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTOB = tmp->getTH2F();
421  tmp = dqmStore_->book2D ("MPV_Vs_PhiTEC" , "MPV_Vs_PhiTEC" , 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTEC = tmp->getTH2F();
422  tmp = dqmStore_->book2D ("MPV_Vs_PhiTEC1" , "MPV_Vs_PhiTEC1", 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTEC1 = tmp->getTH2F();
423  tmp = dqmStore_->book2D ("MPV_Vs_PhiTEC2" , "MPV_Vs_PhiTEC2", 50, -3.2, 3.2, 300, 0, 600); MPV_Vs_PhiTEC2 = tmp->getTH2F();
424 
425 
426  tmp = dqmStore_->book1D ("MPV_Vs_PathTIB" , "MPV_Vs_PathTIB" ,100,0.2,1.4); MPV_Vs_PathTIB = tmp->getTH1F();
427  tmp = dqmStore_->book1D ("MPV_Vs_PathTID" , "MPV_Vs_PathTID" ,100,0.2,1.4); MPV_Vs_PathTID = tmp->getTH1F();
428  tmp = dqmStore_->book1D ("MPV_Vs_PathTOB" , "MPV_Vs_PathTOB" ,100,0.2,1.4); MPV_Vs_PathTOB = tmp->getTH1F();
429  tmp = dqmStore_->book1D ("MPV_Vs_PathTEC" , "MPV_Vs_PathTEC" ,100,0.2,1.4); MPV_Vs_PathTEC = tmp->getTH1F();
430  tmp = dqmStore_->book1D ("MPV_Vs_PathTEC1" , "MPV_Vs_PathTEC1" ,100,0.2,1.4); MPV_Vs_PathTEC1 = tmp->getTH1F();
431  tmp = dqmStore_->book1D ("MPV_Vs_PathTEC2" , "MPV_Vs_PathTEC2" ,100,0.2,1.4); MPV_Vs_PathTEC2 = tmp->getTH1F();
432 
433  tmp = dqmStore_->book2D ("MPV_Vs_Phi", "MPV_Vs_Phi", 50, -3.2, 3.2 , 300, 0, 600); MPV_Vs_Phi = tmp->getTH2F();
434  tmp = dqmStore_->book2D ("MPV_Vs_Eta", "MPV_Vs_Eta", 50, -3.0, 3.0 , 300, 0, 600); MPV_Vs_Eta = tmp->getTH2F();
435  tmp = dqmStore_->book2D ("MPV_Vs_R" , "MPV_Vs_R" , 150, 0.0, 150.0, 300, 0, 600); MPV_Vs_R = tmp->getTH2F();
436 /*
437  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS1" , "MPV_Vs_PathLength_CS1" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS1 = tmp->getTH1F();
438  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS2" , "MPV_Vs_PathLength_CS2" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS2 = tmp->getTH1F();
439  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS3" , "MPV_Vs_PathLength_CS3" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS3 = tmp->getTH1F();
440  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS4" , "MPV_Vs_PathLength_CS4" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS4 = tmp->getTH1F();
441  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS5" , "MPV_Vs_PathLength_CS5" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS5 = tmp->getTH1F();
442 
443  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS1" , "FWHM_Vs_PathLength_CS1", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS1 = tmp->getTH1F();
444  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS2" , "FWHM_Vs_PathLength_CS2", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS2 = tmp->getTH1F();
445  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS3" , "FWHM_Vs_PathLength_CS3", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS3 = tmp->getTH1F();
446  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS4" , "FWHM_Vs_PathLength_CS4", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS4 = tmp->getTH1F();
447  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS5" , "FWHM_Vs_PathLength_CS5", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS5 = tmp->getTH1F();
448 */
449  tmp = dqmStore_->book1D ("MPV_Vs_PathLength" , "MPV_Vs_PathLength" , 100, 0.2, 1.4); MPV_Vs_PathLength = tmp->getTH1F();
450  tmp = dqmStore_->book1D ("MPV_Vs_PathLength320" , "MPV_Vs_PathLength" , 100, 0.2, 1.4); MPV_Vs_PathLength320 = tmp->getTH1F();
451  tmp = dqmStore_->book1D ("MPV_Vs_PathLength500" , "MPV_Vs_PathLength" , 100, 0.2, 1.4); MPV_Vs_PathLength500 = tmp->getTH1F();
452 
453  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength" , "FWHM_Vs_PathLength" , 100, 0.2, 1.4); FWHM_Vs_PathLength = tmp->getTH1F();
454  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength320" , "FWHM_Vs_PathLength" , 100, 0.2, 1.4); FWHM_Vs_PathLength320 = tmp->getTH1F();
455  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength500" , "FWHM_Vs_PathLength" , 100, 0.2, 1.4); FWHM_Vs_PathLength500 = tmp->getTH1F();
456 
457  tmp = dqmStore_->book1D ("MPV_Vs_TransversAngle" , "MPV_Vs_TransversAngle" , 220, -20, 200); MPV_Vs_TransversAngle = tmp->getTH1F();
458  tmp = dqmStore_->book1D ("MPV_Vs_Alpha" , "MPV_Vs_Alpha" , 220, -20, 200); MPV_Vs_Alpha = tmp->getTH1F();
459  tmp = dqmStore_->book1D ("MPV_Vs_Beta" , "MPV_Vs_Beta" , 220, -20, 200); MPV_Vs_Beta = tmp->getTH1F();
460 
461  tmp = dqmStore_->book2D ("Error_Vs_MPV" , "Error_Vs_MPV" ,600,0,600 ,100 ,0 ,50); Error_Vs_MPV = tmp->getTH2F();
462  tmp = dqmStore_->book2D ("Error_Vs_Entries","Error_Vs_Entries",500,0,10000 ,100 ,0 ,50); Error_Vs_Entries = tmp->getTH2F();
463  tmp = dqmStore_->book2D ("Error_Vs_Eta" , "Error_Vs_Eta" ,50 ,-3.0,3.0 ,100 ,0 ,50 ); Error_Vs_Eta = tmp->getTH2F();
464  tmp = dqmStore_->book2D ("Error_Vs_Phi" , "Error_Vs_Phi" ,50 ,-3.2,3.2 ,100 ,0 ,50); Error_Vs_Phi = tmp->getTH2F();
465 
466 
467  tmp = dqmStore_->book2D ("NoMPV_Vs_EtaPhi" , "NoMPV_Vs_EtaPhi" ,50,-3.0,3.0 ,50 ,-3.2,3.2); NoMPV_Vs_EtaPhi = tmp->getTH2F();
468 
469 
470 
471  tmp = dqmStore_->book1D ("NumberOfEntriesByAPV" , "NumberOfEntriesByAPV" , 1000, 0,10000); NumberOfEntriesByAPV = tmp->getTH1F();
472  tmp = dqmStore_->book1D ("Chi2OverNDF","Chi2OverNDF", 500, 0,25); HChi2OverNDF = tmp->getTH1F();
473 
474  tmp = dqmStore_->book1D ("MPVs", "MPVs", 600,0,600); MPVs = tmp->getTH1F();
475  tmp = dqmStore_->book1D ("MPVs320", "MPVs320", 600,0,600); MPVs320 = tmp->getTH1F();
476  tmp = dqmStore_->book1D ("MPVs500", "MPVs500", 600,0,600); MPVs500 = tmp->getTH1F();
477 
478 // MPV_vs_10RplusEta tmp = dqmStore_->book2D ("MPV_vs_10RplusEta","MPV_vs_10RplusEta", 48000,0,2400, 800,100,500);
479  }
480 
481  gROOT->cd();
482 
484  iSetup.get<TrackerDigiGeometryRecord>().get( tkGeom );
485  auto const & Det = tkGeom->dets();
486 
487 
488  edm::ESHandle<SiStripGain> gainHandle;
489 // if(strcmp(AlgoMode.c_str(),"MultiJob")!=0 && !FirstSetOfConstants){
490  iSetup.get<SiStripGainRcd>().get(gainHandle);
491  if(!gainHandle.isValid()){printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");exit(0);}
492 // }
493 
494  unsigned int Id=0;
495  for(unsigned int i=0;i<Det.size();i++){
496  DetId Detid = Det[i]->geographicalId();
497  int SubDet = Detid.subdetId();
498 
499  if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID ||
500  SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){
501 
502  auto DetUnit = dynamic_cast<StripGeomDetUnit const*> (Det[i]);
503  if(!DetUnit)continue;
504 
505  const StripTopology& Topo = DetUnit->specificTopology();
506  unsigned int NAPV = Topo.nstrips()/128;
507 
508  double Phi = DetUnit->position().basicVector().phi();
509  double Eta = DetUnit->position().basicVector().eta();
510  double R = DetUnit->position().basicVector().transverse();
511  double Thick = DetUnit->surface().bounds().thickness();
512 
513  for(unsigned int j=0;j<NAPV;j++){
514  stAPVGain* APV = new stAPVGain;
515  APV->Index = Id;
516  APV->DetId = Detid.rawId();
517  APV->APVId = j;
518  APV->SubDet = SubDet;
519  APV->MPV = -1;
520  APV->Gain = -1;
521  APV->PreviousGain = 1;
522  APV->Eta = Eta;
523  APV->Phi = Phi;
524  APV->R = R;
525  APV->Thickness = Thick;
526  APV->Side = 0;
527 
528  if(SubDet==StripSubdetector::TID){
529 
530  APV->Side = tTopo->tecSide(Detid);
531  }else if(SubDet==StripSubdetector::TEC){
532 
533  APV->Side = tTopo->tecSide(Detid);
534  }
535 
536  APVsCollOrdered.push_back(APV);
537  APVsColl[(APV->DetId<<3) | APV->APVId] = APV;
538  Id++;
539 
540  APV_DetId ->Fill(Id,APV->DetId);
541  APV_Id ->Fill(Id,APV->APVId);
542  APV_Eta ->Fill(Id,APV->Eta);
543  APV_R ->Fill(Id,APV->R);
544  APV_SubDet ->Fill(Id,APV->SubDet);
545  APV_Thickness->Fill(Id,APV->Thickness);
546  }
547  }
548  }
549 
550  NEvent = 0;
551  SRun = 0;
552  SEvent = 0;
553  STimestamp = 0;
554  ERun = 0;
555  EEvent = 0;
556  ETimestamp = 0;
557 }
TH1F * getTH1F() const
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
float Thickness
Definition: APVGainStruct.h:19
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:50
unsigned int DetId
Definition: APVGainStruct.h:10
const edm::EventSetup * iSetup_
const DetContainer & dets() const override
Returm a vector of all GeomDet (including all GeomDetUnits)
double Gain
Definition: APVGainStruct.h:26
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:41
TH2F * getTH2F() const
Definition: DetId.h:18
virtual int nstrips() const =0
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
unsigned int SubDet
Definition: APVGainStruct.h:12
T const * product() const
Definition: ESHandle.h:86
unsigned int tecSide(const DetId &id) const
void SiStripGainFromData::algoBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 970 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_PrevGain, stAPVGain::APVId, APVsCollOrdered, stAPVGain::DetId, cmsRelvalreport::exit, FirstSetOfConstants, edm::EventSetup::get(), SiStripGain::getRange(), stAPVGain::Index, edm::ESHandleBase::isValid(), stAPVGain::PreviousGain, and Validation.

970  {
971 
972  edm::ESHandle<SiStripGain> gainHandle;
973  if((strcmp(AlgoMode.c_str(),"MultiJob")!=0 && !FirstSetOfConstants) || Validation){
974  iSetup.get<SiStripGainRcd>().get(gainHandle);
975  if(!gainHandle.isValid()){printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");exit(0);}
976 
977 
978  for(std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin();it!=APVsCollOrdered.end();it++){
979  stAPVGain* APV = *it;
980 
981  if(gainHandle.isValid()){
982  SiStripApvGain::Range detGainRange = gainHandle->getRange(APV->DetId);
983  APV->PreviousGain = *(detGainRange.first + APV->APVId);
984 // APV_PrevGain->Fill(APV->Index,APV->PreviousGain);
985  APV_PrevGain->SetBinContent(APV_PrevGain->GetXaxis()->FindBin(APV->Index),APV->PreviousGain);
986  if(APV->PreviousGain<0)APV->PreviousGain = 1;
987  }else{
988  printf("GAIN HANDLE IS NOT VALID\n");
989  }
990  }
991  }
992 
993 
994 }
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
std::pair< ContainerIterator, ContainerIterator > Range
T get() const
Definition: EventSetup.h:71
bool isValid() const
Definition: ESHandle.h:44
const SiStripApvGain::Range getRange(uint32_t detID) const
Definition: SiStripGain.h:71
void SiStripGainFromData::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 560 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, stringResolutionProvider_cfi::bin, CalibrationLevel, 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, stAPVGain::Eta, f, FrontierConditions_GlobalTag_cff::file, FirstSetOfConstants, FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, getPeakOfLandau(), hcaldqm::constants::GOOD, HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, Exhume::I, stAPVGain::Index, createfilelist::int, JobInfo, MaxMPVError, stAPVGain::MPV, 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, stAPVGain::Phi, stAPVGain::PreviousGain, stAPVGain::R, SEvent, stAPVGain::Side, SRun, stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and VInputFiles.

560  {
561 
562 
563  unsigned int I=0;
564 
565  if( strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"Merge")==0){
566  TH1::AddDirectory(kTRUE);
567 
568  TFile* file = nullptr;
569  for(unsigned int f=0;f<VInputFiles.size();f++){
570  printf("Loading New Input File : %s\n", VInputFiles[f].c_str());
571  if(CheckIfFileExist){
572  FILE* doesFileExist = fopen( VInputFiles[f].c_str(), "r" );
573  if(!doesFileExist){
574  printf("File %s doesn't exist\n",VInputFiles[f].c_str());
575  continue;
576  }else{
577  fclose(doesFileExist);
578  }
579  }
580  file = new TFile( VInputFiles[f].c_str() ); if(!file || file->IsZombie() ){printf("### Bug With File %s\n### File will be skipped \n",VInputFiles[f].c_str()); continue;}
581  APV_Charge ->Add( (TH1*) file->FindObjectAny("APV_Charge") , 1);
582  APV_Momentum ->Add( (TH1*) file->FindObjectAny("APV_Momentum") , 1);
583  APV_PathLength ->Add( (TH1*) file->FindObjectAny("APV_PathLength") , 1);
584 
585  Tracks_P_Vs_Eta ->Add( (TH1*) file->FindObjectAny("Tracks_P_Vs_Eta") , 1);
586  Tracks_Pt_Vs_Eta ->Add( (TH1*) file->FindObjectAny("Tracks_Pt_Vs_Eta") , 1);
587 
588  Charge_Vs_PathTIB ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTIB") , 1);
589  Charge_Vs_PathTID ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTID") , 1);
590  Charge_Vs_PathTOB ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTOB") , 1);
591  Charge_Vs_PathTEC ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTEC") , 1);
592  Charge_Vs_PathTEC1 ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTEC1") , 1);
593  Charge_Vs_PathTEC2 ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathTEC2") , 1);
594 
595  HTrackChi2OverNDF ->Add( (TH1*) file->FindObjectAny("TrackChi2OverNDF") , 1);
596  HTrackHits ->Add( (TH1*) file->FindObjectAny("TrackHits") , 1);
597 
598  NHighStripInCluster ->Add( (TH1*) file->FindObjectAny("NHighStripInCluster") , 1);
599  NSatStripInCluster ->Add( (TH1*) file->FindObjectAny("NSatStripInCluster") , 1);
600  Charge_Vs_PathLength ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathLength") , 1);
601  Charge_Vs_PathLength320 ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathLength320") , 1);
602  Charge_Vs_PathLength500 ->Add( (TH1*) file->FindObjectAny("Charge_Vs_PathLength500") , 1);
603  Charge_Vs_TransversAngle ->Add( (TH1*) file->FindObjectAny("Charge_Vs_TransversAngle") , 1);
604  NStrips_Vs_TransversAngle->Add( (TH1*) file->FindObjectAny("NStrips_Vs_TransversAngle"), 1);
605  Charge_Vs_Alpha ->Add( (TH1*) file->FindObjectAny("Charge_Vs_Alpha") , 1);
606  NStrips_Vs_Alpha ->Add( (TH1*) file->FindObjectAny("NStrips_Vs_Alpha") , 1);
607  HFirstStrip ->Add( (TH1*) file->FindObjectAny("FirstStrip") , 1);
608 
609  TH1F* JobInfo_tmp = (TH1F*) file->FindObjectAny("JobInfo");
610  NEvent += (unsigned int) JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(1));
611  unsigned int tmp_SRun = (unsigned int) JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(3));
612  unsigned int tmp_SEvent = (unsigned int) JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(4));
613  unsigned int tmp_ERun = (unsigned int) JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(6));
614  unsigned int tmp_EEvent = (unsigned int) JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(7));
615 
616  if(SRun==0)SRun = tmp_SRun;
617 
618  if (tmp_SRun< SRun){SRun=tmp_SRun; SEvent=tmp_SEvent;}
619  else if(tmp_SRun==SRun && tmp_SEvent<SEvent){SEvent=tmp_SEvent;}
620 
621  if (tmp_ERun> ERun){ERun=tmp_ERun; EEvent=tmp_EEvent;}
622  else if(tmp_ERun==ERun && tmp_EEvent>EEvent){EEvent=tmp_EEvent;}
623 
624  printf("Deleting Current Input File\n");
625  file->Close();
626  delete file;
627  }
628  }
629 
630  JobInfo->Fill(1,NEvent);
631  JobInfo->Fill(3,SRun);
632  JobInfo->Fill(4,SEvent);
633  JobInfo->Fill(6,ERun);
634  JobInfo->Fill(7,EEvent);
635 
636 
637  if( strcmp(AlgoMode.c_str(),"MultiJob")!=0 ){
638  TH1D* Proj = nullptr;
639  double FitResults[5];
640  I=0;
641  for(auto it = APVsColl.begin();it!=APVsColl.end();it++){
642  if( I%3650==0 ) printf("Fitting Histograms \t %6.2f%%\n",(100.0*I)/APVsColl.size());
643  I++;
644  stAPVGain* APV = it->second;
645 
646  int bin = APV_Charge->GetXaxis()->FindBin(APV->Index);
647  Proj = APV_Charge->ProjectionY(" ",bin,bin,"e");
648  Proj = (TH1D*)Proj->Clone();
649  if(Proj==nullptr)continue;
650 
651  // ADD PROJECTTIONS COMMING FROM THE SECOND APV IN THE PAIR
652  if(CalibrationLevel==1){
653  int SecondAPVId = APV->APVId;
654  if(SecondAPVId%2==0){
655  SecondAPVId = SecondAPVId+1;
656  }else{
657  SecondAPVId = SecondAPVId-1;
658  }
659  stAPVGain* APV2 = APVsColl[(APV->DetId<<3) | SecondAPVId];
660 
661  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
662  TH1D* Proj2 = APV_Charge->ProjectionY(" ",bin2,bin2,"e");
663  if(Proj2!=nullptr){
664  Proj->Add(Proj2,1);
665  }
666  }else if(CalibrationLevel>1){
667 // printf("%8i %i--> %4.0f + %4.0f\n",APV->DetId, APV->APVId, 0.0, Proj->GetEntries());
668  for(auto it2 = APVsColl.begin();it2!=APVsColl.end();it2++){
669  stAPVGain* APV2 = it2->second;
670 
671  if(APV2->DetId != APV->DetId)continue;
672  if(APV2->APVId == APV->APVId)continue;
673 
674  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
675  TH1D* Proj2 = APV_Charge->ProjectionY(" ",bin2,bin2,"e");
676  if(Proj2!=nullptr){
677 // printf("%8i %i--> %4.0f + %4.0f\n",APV2->DetId, APV2->APVId, Proj->GetEntries(), Proj2->GetEntries());
678  Proj->Add(Proj2,1);
679  }
680  }
681 // printf("%8i %i--> %4.0f Full\n",APV->DetId, APV->APVId, Proj->GetEntries());
682  }
683 
684 
685  //std::cout << "Proj->GetEntries(): " << Proj->GetEntries() << ", Proj->GetMean(): " << Proj->GetMean() << std::endl;
686 
687  getPeakOfLandau(Proj,FitResults);
688  APV->MPV = FitResults[0];
689 // printf("MPV = %f - %f\n",FitResults[0], FitResults[1]);
690  if(FitResults[0]!=-0.5 && FitResults[1]<MaxMPVError){
691  APV_MPV->Fill(APV->Index,APV->MPV);
692  MPVs ->Fill(APV->MPV);
693  if(APV->Thickness<0.04) MPVs320->Fill(APV->MPV);
694  if(APV->Thickness>0.04) MPVs500->Fill(APV->MPV);
695 
696  MPV_Vs_R->Fill(APV->R,APV->MPV);
697  MPV_Vs_Eta->Fill(APV->Eta,APV->MPV);
698  if(APV->SubDet==StripSubdetector::TIB) MPV_Vs_EtaTIB ->Fill(APV->Eta,APV->MPV);
699  if(APV->SubDet==StripSubdetector::TID) MPV_Vs_EtaTID ->Fill(APV->Eta,APV->MPV);
700  if(APV->SubDet==StripSubdetector::TOB) MPV_Vs_EtaTOB ->Fill(APV->Eta,APV->MPV);
701  if(APV->SubDet==StripSubdetector::TEC){ MPV_Vs_EtaTEC ->Fill(APV->Eta,APV->MPV);
702  if(APV->Thickness<0.04) MPV_Vs_EtaTEC1->Fill(APV->Eta,APV->MPV);
703  if(APV->Thickness>0.04) MPV_Vs_EtaTEC2->Fill(APV->Eta,APV->MPV);
704  }
705  MPV_Vs_Phi->Fill(APV->Phi,APV->MPV);
706  if(APV->SubDet==StripSubdetector::TIB) MPV_Vs_PhiTIB ->Fill(APV->Phi,APV->MPV);
707  if(APV->SubDet==StripSubdetector::TID) MPV_Vs_PhiTID ->Fill(APV->Phi,APV->MPV);
708  if(APV->SubDet==StripSubdetector::TOB) MPV_Vs_PhiTOB ->Fill(APV->Phi,APV->MPV);
709  if(APV->SubDet==StripSubdetector::TEC){ MPV_Vs_PhiTEC ->Fill(APV->Phi,APV->MPV);
710  if(APV->Thickness<0.04) MPV_Vs_PhiTEC1->Fill(APV->Phi,APV->MPV);
711  if(APV->Thickness>0.04) MPV_Vs_PhiTEC2->Fill(APV->Phi,APV->MPV);
712  }
713 
714  if(APV->SubDet==StripSubdetector::TIB) Charge_TIB ->Add(Proj,1);
715  if(APV->SubDet==StripSubdetector::TID){ Charge_TID ->Add(Proj,1);
716  if(APV->Side==1) Charge_TIDM->Add(Proj,1);
717  if(APV->Side==2) Charge_TIDP->Add(Proj,1);
718  }
719  if(APV->SubDet==StripSubdetector::TOB) Charge_TOB ->Add(Proj,1);
720  if(APV->SubDet==StripSubdetector::TEC){ Charge_TEC ->Add(Proj,1);
721  if(APV->Thickness<0.04) Charge_TEC1->Add(Proj,1);
722  if(APV->Thickness>0.04) Charge_TEC2->Add(Proj,1);
723  if(APV->Side==1) Charge_TECM->Add(Proj,1);
724  if(APV->Side==2) Charge_TECP->Add(Proj,1);
725  }
726  }
727 
728  if(APV->SubDet==StripSubdetector::TIB) Charge_TIB ->Add(Proj,1);
729  if(APV->SubDet==StripSubdetector::TID){ Charge_TID ->Add(Proj,1);
730  if(APV->Side==1) Charge_TIDM->Add(Proj,1);
731  if(APV->Side==2) Charge_TIDP->Add(Proj,1);
732  }
733  if(APV->SubDet==StripSubdetector::TOB) Charge_TOB ->Add(Proj,1);
734  if(APV->SubDet==StripSubdetector::TEC){ Charge_TEC ->Add(Proj,1);
735  if(APV->Thickness<0.04) Charge_TEC1->Add(Proj,1);
736  if(APV->Thickness>0.04) Charge_TEC2->Add(Proj,1);
737  if(APV->Side==1) Charge_TECM->Add(Proj,1);
738  if(APV->Side==2) Charge_TECP->Add(Proj,1);
739  }
740 
741  if(FitResults[0]!=-0.5){
742  HChi2OverNDF->Fill(FitResults[4]);
743  Error_Vs_MPV->Fill(FitResults[0],FitResults[1]);
744  Error_Vs_Entries->Fill(Proj->GetEntries(),FitResults[1]);
745  Error_Vs_Eta->Fill(APV->Eta,FitResults[1]);
746  Error_Vs_Phi->Fill(APV->Phi,FitResults[1]);
747  }
748  NumberOfEntriesByAPV->Fill(Proj->GetEntries());
749  delete Proj;
750 
751 
752  Proj = APV_PathLength->ProjectionY(" ",bin,bin,"e");
753  if(Proj==nullptr)continue;
754 
755  APV_PathLengthM->SetBinContent(APV->Index, Proj->GetMean(1) );
756  APV_PathLengthM->SetBinError (APV->Index, Proj->GetMeanError(1) );
757 // delete Proj;
758  }
759 
760  unsigned int GOOD = 0;
761  unsigned int BAD = 0;
762  double MPVmean = MPVs->GetMean();
763  MPVmean = 300;
764  for(auto it = APVsColl.begin();it!=APVsColl.end();it++){
765 
766  stAPVGain* APV = it->second;
767  if(APV->MPV>0){
768  APV->Gain = APV->MPV / MPVmean; // APV->MPV;
769  GOOD++;
770  }else{
771  NoMPV_Vs_EtaPhi->Fill(APV->Eta, APV->Phi);
772  APV->Gain = 1;
773  BAD++;
774  }
775  if(APV->Gain<=0) APV->Gain = 1;
776  APV_Gain->Fill(APV->Index,APV->Gain);
777 
778  if(!FirstSetOfConstants) APV->Gain *= APV->PreviousGain;
779  APV_CumulGain->Fill(APV->Index,APV->Gain);
780  }
781 
782  for(int j=0;j<Charge_Vs_PathLength->GetXaxis()->GetNbins();j++){
783  Proj = Charge_Vs_PathLength->ProjectionY(" ",j,j,"e");
784  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
785  MPV_Vs_PathLength->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
786  MPV_Vs_PathLength->SetBinError (j, FitResults[1]/Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
787  FWHM_Vs_PathLength->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)) );
788  FWHM_Vs_PathLength->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)) );
789  delete Proj;
790  }
791 
792  for(int j=0;j<Charge_Vs_PathLength320->GetXaxis()->GetNbins();j++){
793  Proj = Charge_Vs_PathLength320->ProjectionY(" ",j,j,"e");
794  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
795  MPV_Vs_PathLength320->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
796  MPV_Vs_PathLength320->SetBinError (j, FitResults[1]/Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
797  FWHM_Vs_PathLength320->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)) );
798  FWHM_Vs_PathLength320->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)) );
799  delete Proj;
800  }
801 
802  for(int j=0;j<Charge_Vs_PathLength500->GetXaxis()->GetNbins();j++){
803  Proj = Charge_Vs_PathLength500->ProjectionY(" ",j,j,"e");
804  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
805  MPV_Vs_PathLength500->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
806  MPV_Vs_PathLength500->SetBinError (j, FitResults[1]/Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
807  FWHM_Vs_PathLength500->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j) ));
808  FWHM_Vs_PathLength500->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j) ));
809  delete Proj;
810  }
811 /*
812  for(int j=0;j<Charge_Vs_PathLength_CS1->GetXaxis()->GetNbins();j++){
813  Proj = Charge_Vs_PathLength_CS1->ProjectionY(" ",j,j,"e");
814  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
815  MPV_Vs_PathLength_CS1->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
816  MPV_Vs_PathLength_CS1->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
817  FWHM_Vs_PathLength_CS1->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
818  FWHM_Vs_PathLength_CS1->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
819  delete Proj;
820  }
821 
822  for(int j=0;j<Charge_Vs_PathLength_CS2->GetXaxis()->GetNbins();j++){
823  Proj = Charge_Vs_PathLength_CS2->ProjectionY(" ",j,j,"e");
824  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
825  MPV_Vs_PathLength_CS2->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
826  MPV_Vs_PathLength_CS2->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
827  FWHM_Vs_PathLength_CS2->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
828  FWHM_Vs_PathLength_CS2->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
829  delete Proj;
830  }
831 
832  for(int j=0;j<Charge_Vs_PathLength_CS3->GetXaxis()->GetNbins();j++){
833  Proj = Charge_Vs_PathLength_CS3->ProjectionY(" ",j,j,"e");
834  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
835  MPV_Vs_PathLength_CS3->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
836  MPV_Vs_PathLength_CS3->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
837  FWHM_Vs_PathLength_CS3->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
838  FWHM_Vs_PathLength_CS3->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
839  delete Proj;
840  }
841 
842  for(int j=0;j<Charge_Vs_PathLength_CS4->GetXaxis()->GetNbins();j++){
843  Proj = Charge_Vs_PathLength_CS4->ProjectionY(" ",j,j,"e");
844  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
845  MPV_Vs_PathLength_CS4->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
846  MPV_Vs_PathLength_CS4->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
847  FWHM_Vs_PathLength_CS4->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
848  FWHM_Vs_PathLength_CS4->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
849  delete Proj;
850  }
851 
852  for(int j=0;j<Charge_Vs_PathLength_CS5->GetXaxis()->GetNbins();j++){
853  Proj = Charge_Vs_PathLength_CS5->ProjectionY(" ",j,j,"e");
854  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
855  MPV_Vs_PathLength_CS5->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
856  MPV_Vs_PathLength_CS5->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
857  FWHM_Vs_PathLength_CS5->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
858  FWHM_Vs_PathLength_CS5->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
859  delete Proj;
860  }
861 */
862 
863 
864  for(int j=0;j<Charge_Vs_PathTIB->GetXaxis()->GetNbins();j++){
865  Proj = Charge_Vs_PathTIB->ProjectionY(" ",j,j,"e");
866  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
867  MPV_Vs_PathTIB->SetBinContent(j, FitResults[0]/Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
868  MPV_Vs_PathTIB->SetBinError (j, FitResults[1]/Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
869  delete Proj;
870  }
871 
872  for(int j=0;j<Charge_Vs_PathTID->GetXaxis()->GetNbins();j++){
873  Proj = Charge_Vs_PathTID->ProjectionY(" ",j,j,"e");
874  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
875  MPV_Vs_PathTID->SetBinContent(j, FitResults[0]/Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
876  MPV_Vs_PathTID->SetBinError (j, FitResults[1]/Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
877  delete Proj;
878  }
879 
880  for(int j=0;j<Charge_Vs_PathTOB->GetXaxis()->GetNbins();j++){
881  Proj = Charge_Vs_PathTOB->ProjectionY(" ",j,j,"e");
882  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
883  MPV_Vs_PathTOB->SetBinContent(j, FitResults[0]/Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
884  MPV_Vs_PathTOB->SetBinError (j, FitResults[1]/Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
885  delete Proj;
886  }
887 
888  for(int j=0;j<Charge_Vs_PathTEC->GetXaxis()->GetNbins();j++){
889  Proj = Charge_Vs_PathTEC->ProjectionY(" ",j,j,"e");
890  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
891  MPV_Vs_PathTEC->SetBinContent(j, FitResults[0]/Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
892  MPV_Vs_PathTEC->SetBinError (j, FitResults[1]/Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
893  delete Proj;
894  }
895 
896  for(int j=0;j<Charge_Vs_PathTEC1->GetXaxis()->GetNbins();j++){
897  Proj = Charge_Vs_PathTEC1->ProjectionY(" ",j,j,"e");
898  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
899  MPV_Vs_PathTEC1->SetBinContent(j, FitResults[0]/Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
900  MPV_Vs_PathTEC1->SetBinError (j, FitResults[1]/Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
901  delete Proj;
902  }
903 
904  for(int j=0;j<Charge_Vs_PathTEC2->GetXaxis()->GetNbins();j++){
905  Proj = Charge_Vs_PathTEC2->ProjectionY(" ",j,j,"e");
906  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
907  MPV_Vs_PathTEC2->SetBinContent(j, FitResults[0]/Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
908  MPV_Vs_PathTEC2->SetBinError (j, FitResults[1]/Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
909  delete Proj;
910  }
911 
912 
913  for(int j=1;j<Charge_Vs_TransversAngle->GetXaxis()->GetNbins();j++){
914  Proj = Charge_Vs_TransversAngle->ProjectionY(" ",j,j,"e");
915  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
916  MPV_Vs_TransversAngle->SetBinContent(j, FitResults[0]);
917  MPV_Vs_TransversAngle->SetBinError (j, FitResults[1]);
918  delete Proj;
919  }
920 
921  for(int j=1;j<Charge_Vs_Alpha->GetXaxis()->GetNbins();j++){
922  Proj = Charge_Vs_Alpha->ProjectionY(" ",j,j,"e");
923  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
924  MPV_Vs_Alpha->SetBinContent(j, FitResults[0]);
925  MPV_Vs_Alpha->SetBinError (j, FitResults[1]);
926  delete Proj;
927  }
928 
929  for(int j=1;j<Charge_Vs_Beta->GetXaxis()->GetNbins();j++){
930  Proj = Charge_Vs_Beta->ProjectionY(" ",j,j,"e");
931  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
932  MPV_Vs_Beta->SetBinContent(j, FitResults[0]);
933  MPV_Vs_Beta->SetBinError (j, FitResults[1]);
934  delete Proj;
935  }
936 
937  FILE* Gains = fopen(OutputGains.c_str(),"w");
938  fprintf(Gains,"NEvents = %i\n",NEvent);
939  fprintf(Gains,"Number of APVs = %lu\n",static_cast<unsigned long>(APVsColl.size()));
940  fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD));
941  for(std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin();it!=APVsCollOrdered.end();it++){
942  stAPVGain* APV = *it;
943  fprintf(Gains,"%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain);
944  }
945 
946  std::vector<int> DetIdOfBuggedAPV;
947  fprintf(Gains,"----------------------------------------------------------------------\n");
948  for(std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin();it!=APVsCollOrdered.end();it++){
949  stAPVGain* APV = *it;
950  if(APV->MPV>0 && APV->MPV<200){
951  bool tmpBug = false;
952  for(unsigned int b=0;b<DetIdOfBuggedAPV.size()&&!tmpBug;b++){if(DetIdOfBuggedAPV[b]==APV->DetId)tmpBug=true;}
953  if(!tmpBug){fprintf(Gains,"%i,\n",APV->DetId);DetIdOfBuggedAPV.push_back(APV->DetId);}
954  }
955  }
956 
957 
958  fclose(Gains);
959 
960 // delete [] FitResults;
961 // delete Proj;
962  }
963 
964  dqmStore_->cd();
965  dqmStore_->save(OutputHistos);
966 
967 }
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
float Thickness
Definition: APVGainStruct.h:19
unsigned int DetId
Definition: APVGainStruct.h:10
vector< string > VInputFiles
double Gain
Definition: APVGainStruct.h:26
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
const std::complex< double > I
Definition: I.h:8
double f[11][100]
double const GOOD
Definition: Constants.h:13
bin
set the eta bin as selection string.
double const BAD
Definition: Constants.h:15
double b
Definition: hdecay.h:120
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
unsigned int SubDet
Definition: APVGainStruct.h:12
double SiStripGainFromData::ComputeChargeOverPath ( const SiStripCluster Cluster,
TrajectoryStateOnSurface  trajState,
const edm::EventSetup iSetup,
const Track track,
double  trajChi2OverN 
)
private

Definition at line 1092 of file SiStripGainFromData.cc.

References a, AllowSaturation, alpha, SiStripCluster::amplitudes(), sistrip::APV, APV_Charge, APV_Momentum, APV_PathLength, APVsColl, pfBoostedDoubleSVAK8TagInfos_cfi::beta, 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, stAPVGain::Index, IsFarFromBorder(), TrajectoryStateOnSurface::localDirection(), PV3DBase< T, PVType, FrameType >::mag(), MaxNrStrips, NHighStripInCluster, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, callgraph::path, funct::pow(), stAPVGain::PreviousGain, mathSSE::sqrt(), stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, 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().

1093 {
1094  LocalVector trackDirection = trajState.localDirection();
1095  double cosine = trackDirection.z()/trackDirection.mag();
1096  auto const & Ampls = Cluster->amplitudes();
1097  uint32_t DetId = 0; // is 0 since long time Cluster->geographicalId();
1098  int FirstStrip = Cluster->firstStrip();
1099  int APVId = FirstStrip/128;
1100  stAPVGain* APV = APVsColl[(DetId<<3) | APVId];
1101  int Saturation = 0;
1102  bool Overlaping = false;
1103  int Charge = 0;
1104  unsigned int NHighStrip = 0;
1105 
1106  if(!IsFarFromBorder(trajState,DetId, iSetup))return -1;
1107 
1108 
1109  if(FirstStrip==0 )Overlaping=true;
1110  if(FirstStrip==128 )Overlaping=true;
1111  if(FirstStrip==256 )Overlaping=true;
1112  if(FirstStrip==384 )Overlaping=true;
1113  if(FirstStrip==512 )Overlaping=true;
1114  if(FirstStrip==640 )Overlaping=true;
1115 
1116  if(FirstStrip<=127 && FirstStrip+Ampls.size()>127)Overlaping=true;
1117  if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlaping=true;
1118  if(FirstStrip<=383 && FirstStrip+Ampls.size()>383)Overlaping=true;
1119  if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlaping=true;
1120  if(FirstStrip<=639 && FirstStrip+Ampls.size()>639)Overlaping=true;
1121 
1122  if(FirstStrip+Ampls.size()==127 )Overlaping=true;
1123  if(FirstStrip+Ampls.size()==255 )Overlaping=true;
1124  if(FirstStrip+Ampls.size()==383 )Overlaping=true;
1125  if(FirstStrip+Ampls.size()==511 )Overlaping=true;
1126  if(FirstStrip+Ampls.size()==639 )Overlaping=true;
1127  if(FirstStrip+Ampls.size()==767 )Overlaping=true;
1128  if(Overlaping)return -1;
1129 
1130 
1131 /*
1132  if(FirstStrip==0 )Overlaping=true;
1133  if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlaping=true;
1134  if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlaping=true;
1135  if(FirstStrip+Ampls.size()==511 )Overlaping=true;
1136  if(FirstStrip+Ampls.size()==767 )Overlaping=true;
1137  if(Overlaping)return -1;
1138 */
1139 
1140  for(unsigned int a=0;a<Ampls.size();a++){Charge+=Ampls[a];if(Ampls[a]>=254)Saturation++;if(Ampls[a]>=20)NHighStrip++;}
1141  double path = (10.0*APV->Thickness)/fabs(cosine);
1142  double ClusterChargeOverPath = (double)Charge / path ;
1143 
1144  NSatStripInCluster->Fill(Saturation);
1145 
1146  if(Ampls.size()>MaxNrStrips) return -1;
1147  if(Saturation>0 && !AllowSaturation)return -1;
1148  Charge_Vs_PathLength ->Fill(path,Charge);
1149  if(APV->Thickness<0.04) Charge_Vs_PathLength320->Fill(path,Charge);
1150  if(APV->Thickness>0.04) Charge_Vs_PathLength500->Fill(path,Charge);
1151  if(APV->SubDet==StripSubdetector::TIB) Charge_Vs_PathTIB ->Fill(path,Charge);
1152  if(APV->SubDet==StripSubdetector::TID) Charge_Vs_PathTID ->Fill(path,Charge);
1153  if(APV->SubDet==StripSubdetector::TOB) Charge_Vs_PathTOB ->Fill(path,Charge);
1154  if(APV->SubDet==StripSubdetector::TEC){ Charge_Vs_PathTEC ->Fill(path,Charge);
1155  if(APV->Thickness<0.04) Charge_Vs_PathTEC1 ->Fill(path,Charge);
1156  if(APV->Thickness>0.04) Charge_Vs_PathTEC2 ->Fill(path,Charge); }
1157 
1158  double trans = atan2(trackDirection.y(),trackDirection.x())*(180/3.14159265);
1159  double alpha = acos(trackDirection.x() / sqrt( pow(trackDirection.x(),2) + pow(trackDirection.z(),2) ) ) * (180/3.14159265);
1160  double beta = acos(trackDirection.y() / sqrt( pow(trackDirection.x(),2) + pow(trackDirection.z(),2) ) ) * (180/3.14159265);
1161 
1162  if(path>0.4 && path<0.45){
1163  Charge_Vs_TransversAngle->Fill(trans,Charge/path);
1164  Charge_Vs_Alpha->Fill(alpha,Charge/path);
1165  Charge_Vs_Beta->Fill(beta,Charge/path);
1166  }
1167 
1168  NStrips_Vs_TransversAngle->Fill(trans,Ampls.size());
1169  NStrips_Vs_Alpha ->Fill(alpha,Ampls.size());
1170  NStrips_Vs_Beta ->Fill(beta ,Ampls.size());
1171 
1172  NHighStripInCluster->Fill(NHighStrip);
1173 // if(NHighStrip==1) Charge_Vs_PathLength_CS1->Fill(path, Charge );
1174 // if(NHighStrip==2) Charge_Vs_PathLength_CS2->Fill(path, Charge );
1175 // if(NHighStrip==3) Charge_Vs_PathLength_CS3->Fill(path, Charge );
1176 // if(NHighStrip==4) Charge_Vs_PathLength_CS4->Fill(path, Charge );
1177 // if(NHighStrip==5) Charge_Vs_PathLength_CS5->Fill(path, Charge );
1178 
1179  HFirstStrip ->Fill(FirstStrip);
1180 
1181 
1182  if(Validation){ClusterChargeOverPath=ClusterChargeOverPath/APV->PreviousGain;}
1183 
1184  APV_Charge ->Fill(APV->Index,ClusterChargeOverPath);
1185  APV_Momentum ->Fill(APV->Index,trajState.globalMomentum().mag());
1186  APV_PathLength->Fill(APV->Index,path);
1187 
1188  return ClusterChargeOverPath;
1189 }
float alpha
Definition: AMPTWrapper.h:95
LocalVector localDirection() const
float Thickness
Definition: APVGainStruct.h:19
bool IsFarFromBorder(TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
T y() const
Definition: PV3DBase.h:63
uint16_t firstStrip() const
T mag() const
Definition: PV3DBase.h:67
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:28
unsigned int Index
Definition: APVGainStruct.h:8
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Definition: DetId.h:18
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:121
T x() const
Definition: PV3DBase.h:62
unsigned int SubDet
Definition: APVGainStruct.h:12
const std::vector< uint8_t > & amplitudes() const
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
std::unique_ptr< SiStripApvGain > SiStripGainFromData::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1280 of file SiStripGainFromData.cc.

References a, AlgoMode, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, gather_cfg::cout, DEFINE_FWK_MODULE, stAPVGain::DetId, stAPVGain::Gain, hgcalPlots::obj, and stAPVGain::PreviousGain.

1281 {
1282  cout << "START getNewObject\n";
1283 
1284 // if( !(strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"SingleJob")==0) )return NULL;
1285  if( !(strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"SingleJob")==0) )
1286  return std::make_unique<SiStripApvGain>();
1287 
1288 
1289  auto obj = std::make_unique<SiStripApvGain>();
1290  std::vector<float>* theSiStripVector = nullptr;
1291  int PreviousDetId = -1;
1292  for(unsigned int a=0;a<APVsCollOrdered.size();a++)
1293  {
1295  if(APV==nullptr){ printf("Bug\n"); continue; }
1296  if(APV->DetId != PreviousDetId){
1297  if(theSiStripVector!=nullptr){
1298  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1299  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1300  }
1301 
1302  theSiStripVector = new std::vector<float>;
1303  PreviousDetId = APV->DetId;
1304  }
1305  printf("%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId,APV->APVId,APV->PreviousGain,APV->Gain);
1306  theSiStripVector->push_back(APV->Gain);
1307 // theSiStripVector->push_back(APV->Gain);
1308  }
1309 
1310  if(theSiStripVector!=nullptr){
1311  SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end());
1312  if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId);
1313  }
1314 
1315  cout << "END getNewObject\n";
1316  return obj;
1317 }
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:11
unsigned int DetId
Definition: APVGainStruct.h:10
double Gain
Definition: APVGainStruct.h:26
double PreviousGain
Definition: APVGainStruct.h:28
std::pair< ContainerIterator, ContainerIterator > Range
double a
Definition: hdecay.h:121
void SiStripGainFromData::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 0,
double  HighRange = 5400 
)
private

Definition at line 1229 of file SiStripGainFromData.cc.

References MaxChi2OverNDF, MinNrEntries, and ApeEstimator_cff::width.

Referenced by algoEndJob().

1230 {
1231  double adcs = -0.5;
1232  double adcs_err = 0.;
1233  double width = -0.5;
1234  double width_err = 0;
1235  double chi2overndf = -0.5;
1236 
1237  double nr_of_entries = InputHisto->GetEntries();
1238 
1239  if( (unsigned int)nr_of_entries < MinNrEntries){
1240  FitResults[0] = adcs;
1241  FitResults[1] = adcs_err;
1242  FitResults[2] = width;
1243  FitResults[3] = width_err;
1244  FitResults[4] = chi2overndf;
1245  return;
1246  }
1247 
1248  // perform fit with standard landau
1249  TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange);
1250  MyLandau->SetParameter("MPV",300);
1251 
1252  InputHisto->Fit(MyLandau,"QR WW");
1253 
1254  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1255  adcs = MyLandau->GetParameter("MPV");
1256  adcs_err = MyLandau->GetParError(1);
1257  width = MyLandau->GetParameter(2);
1258  width_err = MyLandau->GetParError(2);
1259  chi2overndf = MyLandau->GetChisquare() / MyLandau->GetNDF();
1260 
1261  // if still wrong, give up
1262  if(adcs<2. || chi2overndf>MaxChi2OverNDF){
1263  adcs = -0.5; adcs_err = 0.;
1264  width = -0.5; width_err = 0;
1265  chi2overndf = -0.5;
1266  }
1267 
1268  FitResults[0] = adcs;
1269  FitResults[1] = adcs_err;
1270  FitResults[2] = width;
1271  FitResults[3] = width_err;
1272  FitResults[4] = chi2overndf;
1273 
1274  delete MyLandau;
1275 }
bool SiStripGainFromData::IsFarFromBorder ( TrajectoryStateOnSurface  trajState,
const uint32_t  detid,
const edm::EventSetup iSetup 
)
private

Definition at line 1191 of file SiStripGainFromData.cc.

References Surface::bounds(), gather_cfg::cout, edm::EventSetup::get(), TrackerGeometry::idToDetUnit(), Bounds::length(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LocalTrajectoryError::positionError(), GeomDet::surface(), PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by ComputeChargeOverPath().

1192 {
1193  edm::ESHandle<TrackerGeometry> tkGeom; iSetup->get<TrackerDigiGeometryRecord>().get( tkGeom );
1194 
1195  LocalPoint HitLocalPos = trajState.localPosition();
1196  LocalError HitLocalError = trajState.localError().positionError() ;
1197 
1198  const GeomDetUnit* it = tkGeom->idToDetUnit(DetId(detid));
1199  if (dynamic_cast<const StripGeomDetUnit*>(it)==nullptr && dynamic_cast<const PixelGeomDetUnit*>(it)==nullptr) {
1200  std::cout << "this detID doesn't seem to belong to the Tracker" << std::endl;
1201  return false;
1202  }
1203 
1204  const BoundPlane plane = it->surface();
1205  const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
1206  const RectangularPlaneBounds* rectangularBounds( dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));
1207 
1208  double DistFromBorder = 1.0;
1209  //double HalfWidth = it->surface().bounds().width() /2.0;
1210  double HalfLength = it->surface().bounds().length() /2.0;
1211 
1212  if(trapezoidalBounds)
1213  {
1214  std::array<const float, 4> const & parameters = (*trapezoidalBounds).parameters();
1215  HalfLength = parameters[3];
1216  //double t = (HalfLength + HitLocalPos.y()) / (2*HalfLength) ;
1217  //HalfWidth = parameters[0] + (parameters[1]-parameters[0]) * t;
1218  }else if(rectangularBounds){
1219  //HalfWidth = it->surface().bounds().width() /2.0;
1220  HalfLength = it->surface().bounds().length() /2.0;
1221  }else{return false;}
1222 
1223 // if (fabs(HitLocalPos.x())+HitLocalError.xx() >= (HalfWidth - DistFromBorder) ) return false;//Don't think is really necessary
1224  if (fabs(HitLocalPos.y())+HitLocalError.yy() >= (HalfLength - DistFromBorder) ) return false;
1225 
1226  return true;
1227 }
virtual float length() const =0
T y() const
Definition: PV3DBase.h:63
const Bounds & bounds() const
Definition: Surface.h:120
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:42
LocalError positionError() const
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
float yy() const
Definition: LocalError.h:26
const LocalTrajectoryError & localError() const
Definition: DetId.h:18
T get() const
Definition: EventSetup.h:71

Member Data Documentation

std::string SiStripGainFromData::AlgoMode
private
bool SiStripGainFromData::AllowSaturation
private

Definition at line 115 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

TH2F* SiStripGainFromData::APV_Charge
private

Definition at line 192 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::APV_CumulGain
private

Definition at line 197 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_DetId
private

Definition at line 186 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Eta
private

Definition at line 188 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Gain
private

Definition at line 196 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_Id
private

Definition at line 187 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::APV_Momentum
private

Definition at line 191 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::APV_MPV
private

Definition at line 195 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::APV_PathLength
private

Definition at line 193 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::APV_PathLengthM
private

Definition at line 194 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_PrevGain
private

Definition at line 198 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoBeginRun().

TH1F* SiStripGainFromData::APV_R
private

Definition at line 189 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_SubDet
private

Definition at line 190 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Thickness
private

Definition at line 199 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

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

Definition at line 283 of file SiStripGainFromData.cc.

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

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

Definition at line 282 of file SiStripGainFromData.cc.

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

int SiStripGainFromData::CalibrationLevel
private

Definition at line 118 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

TH1F* SiStripGainFromData::Charge_TEC
private

Definition at line 173 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC1
private

Definition at line 174 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC2
private

Definition at line 175 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECM
private

Definition at line 177 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECP
private

Definition at line 176 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIB
private

Definition at line 168 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TID
private

Definition at line 169 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDM
private

Definition at line 171 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDP
private

Definition at line 170 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TOB
private

Definition at line 172 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Charge_Vs_Alpha
private

Definition at line 246 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_Beta
private

Definition at line 250 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathLength
private

Definition at line 229 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathLength320
private

Definition at line 230 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathLength500
private

Definition at line 231 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTEC
private

Definition at line 156 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTEC1
private

Definition at line 157 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTEC2
private

Definition at line 158 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTIB
private

Definition at line 153 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTID
private

Definition at line 154 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_PathTOB
private

Definition at line 155 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Charge_Vs_TransversAngle
private

Definition at line 242 of file SiStripGainFromData.cc.

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

bool SiStripGainFromData::CheckIfFileExist
private

Definition at line 119 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

bool SiStripGainFromData::CheckLocalAngle
private

Definition at line 104 of file SiStripGainFromData.cc.

Referenced by SiStripGainFromData().

DQMStore* SiStripGainFromData::dqmStore_
private

Definition at line 94 of file SiStripGainFromData.cc.

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

unsigned int SiStripGainFromData::EEvent
private

Definition at line 273 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Error_Vs_Entries
private

Definition at line 255 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Eta
private

Definition at line 256 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_MPV
private

Definition at line 254 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Phi
private

Definition at line 257 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::ERun
private

Definition at line 272 of file SiStripGainFromData.cc.

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

TimeValue_t SiStripGainFromData::ETimestamp
private

Definition at line 274 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

bool SiStripGainFromData::FirstSetOfConstants
private

Definition at line 116 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::FWHM_Vs_PathLength
private

Definition at line 237 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength320
private

Definition at line 238 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength500
private

Definition at line 239 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HChi2OverNDF
private

Definition at line 135 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HFirstStrip
private

Definition at line 266 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::HitLocalPosition
private

Definition at line 261 of file SiStripGainFromData.cc.

TH2F* SiStripGainFromData::HitLocalPositionBefCut
private

Definition at line 262 of file SiStripGainFromData.cc.

TH1F* SiStripGainFromData::HTrackChi2OverNDF
private

Definition at line 136 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::HTrackHits
private

Definition at line 137 of file SiStripGainFromData.cc.

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

const edm::Event* SiStripGainFromData::iEvent_
private

Definition at line 102 of file SiStripGainFromData.cc.

Referenced by algoAnalyze().

const edm::EventSetup* SiStripGainFromData::iSetup_
private

Definition at line 101 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::JobInfo
private

Definition at line 264 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

double SiStripGainFromData::MaxChi2OverNDF
private

Definition at line 107 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MaxMPVError
private

Definition at line 106 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MaxNrStrips
private

Definition at line 112 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackChiOverNdf
private

Definition at line 114 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackEta
private

Definition at line 111 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackMomentum
private

Definition at line 109 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinNrEntries
private

Definition at line 105 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackEta
private

Definition at line 110 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinTrackHits
private

Definition at line 113 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackMomentum
private

Definition at line 108 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

TH1F* SiStripGainFromData::MPV_Vs_Alpha
private

Definition at line 247 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_Beta
private

Definition at line 251 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Eta
private

Definition at line 180 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC
private

Definition at line 142 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC1
private

Definition at line 143 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC2
private

Definition at line 144 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTIB
private

Definition at line 139 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTID
private

Definition at line 140 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTOB
private

Definition at line 141 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength
private

Definition at line 233 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength320
private

Definition at line 234 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength500
private

Definition at line 235 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC
private

Definition at line 163 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC1
private

Definition at line 164 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC2
private

Definition at line 165 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTIB
private

Definition at line 160 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTID
private

Definition at line 161 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTOB
private

Definition at line 162 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Phi
private

Definition at line 179 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC
private

Definition at line 149 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC1
private

Definition at line 150 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC2
private

Definition at line 151 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTIB
private

Definition at line 146 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTID
private

Definition at line 147 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTOB
private

Definition at line 148 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_R
private

Definition at line 181 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_TransversAngle
private

Definition at line 243 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs
private

Definition at line 201 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs320
private

Definition at line 202 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs500
private

Definition at line 203 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::NEvent
private

Definition at line 268 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::NHighStripInCluster
private

Definition at line 209 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::NoMPV_Vs_EtaPhi
private

Definition at line 259 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::NSatStripInCluster
private

Definition at line 208 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::NStrips_Vs_Alpha
private

Definition at line 248 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::NStrips_Vs_Beta
private

Definition at line 252 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_TransversAngle
private

Definition at line 244 of file SiStripGainFromData.cc.

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

TH1F* SiStripGainFromData::NumberOfEntriesByAPV
private

Definition at line 134 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

std::string SiStripGainFromData::OutputGains
private

Definition at line 122 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

std::string SiStripGainFromData::OutputHistos
private

Definition at line 123 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::SEvent
private

Definition at line 270 of file SiStripGainFromData.cc.

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

unsigned int SiStripGainFromData::SRun
private

Definition at line 269 of file SiStripGainFromData.cc.

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

TimeValue_t SiStripGainFromData::STimestamp
private

Definition at line 271 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

MonitorElement* SiStripGainFromData::tmp
private

Definition at line 129 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::Tracks_P_Vs_Eta
private

Definition at line 131 of file SiStripGainFromData.cc.

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

TH2F* SiStripGainFromData::Tracks_Pt_Vs_Eta
private

Definition at line 132 of file SiStripGainFromData.cc.

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

std::string SiStripGainFromData::TrajToTrackLabel
private

Definition at line 125 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

std::string SiStripGainFromData::TrajToTrackProducer
private

Definition at line 124 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

bool SiStripGainFromData::Validation
private
vector<string> SiStripGainFromData::VInputFiles
private

Definition at line 127 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().